バーコード生成
テキストをCode128バーコードに変換。SVGとしてダウンロードできます。
バーコード生成とは
バーコード生成ツールとは、文字列をCode128形式の一次元バーコードに変換するツールです。Code128-BはASCII 32〜126の文字(英数字・記号)に対応し、生成結果は鮮明なSVGとして保存できます。処理はすべてブラウザ内で完結します。
🔒 処理はすべてブラウザ内で完結し、データは送信されません。
このツールの前提
- 処理場所
- このページのブラウザ内(JavaScript / Canvas)
- アップロード
- なし — ファイルは端末の外に出ません
- オフライン
- ページを開いた後は通信不要
Code 128-B covers printable ASCII and nothing else
The B subset encodes the 95 printable ASCII characters, space through tilde. Anything outside that range — accented letters, CJK, emoji, a newline — is filtered out before encoding, because the symbology has no code points for them. If the output looks shorter than the input, that filtering is the reason.
Code 128 can switch subsets mid-symbol to pack digits more densely (subset C encodes two digits per symbol character), which is why long numeric strings make shorter barcodes in some generators. This implementation stays in B for predictability.
The checksum is mandatory, and the quiet zone too
Every Code 128 symbol ends with a modulo-103 check character computed from the start code and the weighted values of all data characters. A reader that returns a value at all has already verified it — which is why a misread is rare and a failure to read is common.
Scanners also need a quiet zone of at least ten modules on each side. A barcode printed flush against a label edge, or with text touching the bars, will fail on hardware that worked in testing.
Choosing a symbology for a real requirement
Code 128 is the general-purpose choice for internal labels, shipping and asset tags. Retail products need EAN-13 or UPC-A, which are numeric-only and fixed-length with their own check digit — a Code 128 label will simply not scan at a retail POS.
For anything printed small, check the X-dimension: bars and spaces must each be at least about 0.25 mm for reliable scanning, so a long payload forces a physically wider label. Shortening the encoded value is usually cheaper than buying a better scanner.
使い方
- 1.バーコードにしたい文字を入力
- 2.「実行する」をクリック
- 3.「ダウンロード」でSVGを保存
他の方法との比較
同じ変換をする方法は 3 つあります。ブラウザ内(このページ)、サーバー側の変換サービス、デスクトップアプリ。差がつくのは速度ではなく、ファイルがどこへ行くかと、無料でどこまでできるかです。
| 観点 | このツール | サーバー側の変換サービス | デスクトップアプリ |
|---|---|---|---|
| ファイルの処理場所 | このページのブラウザ内 | ベンダーのサーバー(アップロード後) | 自分の PC(アプリをインストール) |
| アカウント | 不要 | 多くの場合必要(無料枠の制限解除に登録を求める) | 不要(ライセンス認証は必要な場合あり) |
| 無料で扱えるサイズ | サイズ制限なし(回数制限もなし) | 数ファイル/時間、または 5〜10MB 程度で課金 wall | ディスクとメモリ次第 |
| 料金 | 無料。Pro は月 $9(大きいファイルと AI 機能のみ) | サブスクが一般的。おおむね月 $7〜15(2026 年 11 月時点) | 買い切り、またはサブスク |
| オフライン | 一度開けば通信不要 | 不可 | 可 |
| 20MB を処理し始めるまで | 待ち時間なし(アップロードが無い) | アップロードが支配的(10Mbps 上りで約 16 秒) | アプリの起動のみ |
| 保証できないこと | 値は端末の CSPRNG で生成され、サーバーには送られません | 同じ(変換の原理は変わらない) | 同じ。ただし書式の再現はより忠実な場合がある |
サーバー側のサービスが優れている点は明確にあります。巨大なファイル、チームでの共有、変換履歴の管理、スクリプトからの自動化。逆に「1 回だけ、手元のファイルを別形式にしたい」という今回の用途では、アップロードの待ち時間と登録の手間だけが増えます。
よくある質問
Code128とは?
英数字・記号を幅の違う縞で表す一次元バーコードの規格です。物流や在庫管理で広く使われています。
どんな文字が使えますか?
Code128-BはASCII 32〜126(英数字・記号・スペース)に対応します。日本語などの全角文字は自動的に除外されます。
なぜSVGですか?
SVGは拡大しても劣化しないため、印刷やラベル作成に適しています。ダウンロードしてご利用ください。