Tiny Online Tools logoTiny Online Toolssearchツールを検索…grid_viewすべてのツール
ホームchevron_right画像ツールchevron_rightSVGをCSS背景に変換SVGをCSS背景に変換

SVGをCSS背景に変換

SVGコードをCSS background-image用データURLに変換します。

入力SVG
SVGプレビュー
CSS出力
background-image(URLエンコード — 推奨)
css
background-image(base64)
css
backgroundショートハンド(URLエンコード)
css
backgroundショートハンド(base64)
css
CSSカスタムプロパティ(URLエンコード)
css
CSSカスタムプロパティ(base64)
css

関連ツール

画像をBase64に変換

画像をBase64に変換

画像ファイルをBase64エンコード文字列に変換します。

Remove White Background

Remove White Background

Make white or near-white backgrounds transparent in any image. Tolerance and feather controls. Fully private, no upload required.

Base64から画像へ変換

Base64から画像へ変換

Base64文字列を画像ファイルにデコードします。

Canvas Size Extender

Canvas Size Extender

Extend an image's canvas size by adding padding on each side. Solid color or transparent fill. Fully private.

PDFページ並べ替え

PDFページ並べ替え

PDF文書のページ順を並べ替えます。

バーコードジェネレーター

バーコードジェネレーター

商品用バーコードを生成します。

PDFをファイルサイズで分割

PDFをファイルサイズで分割

PDFを指定した最大ファイルサイズ(MB)以下の複数パートに分割します。メール添付やアップロード制限に最適です。

apps

もっと見る

無料オンラインツールの全コレクションを見る。

SVG to CSS Background

Embed SVG graphics directly in your stylesheets as CSS background-image data URLs. This technique eliminates HTTP requests for small icons and patterns, improving page load performance.

Data URL encoding methods

The tool 生成s two encoding options: base64 and URL-encoded フォーマットs. Base64 encoding works everywhere but produces slightly larger output. URL-encoded フォーマット is more human-readable and often smaller, making it ideal when you need to inspect or modify SVG colors directly in CSS.

Multiple CSS output フォーマットs

Get the SVG as background-image properties, complete background shorthand rules, or CSS custom properties for reusability. Copy any フォーマット and paste directly into your stylesheet. The tool 生成s working CSS immediately—no manual tweaking required.

Performance 利点

Inlining SVG backgrounds eliminates the file request overhead of separate icon files. This matters most for small decorative graphics, loading spinners, and backgrounds. Modern ブラウザs handle data URLs efficiently, making this approach ideal for responsive websites where every HTTP request impacts load time.

Design system integration

作成 a library of SVG patterns and icons as CSS variables for consistent styling across components. Modify colors in your CSS without touching image files, enabling theme switching and dynamic styling.

Practical applications

Embed company logos in email template CSS, 作成 decorative backgrounds without additional HTTP requests, style checkbox and radio button designs with inline SVG, 生成 pattern fills for data visualizations, and build accessible icon systems with scalable graphics.