Number / Byte Formatter
Byte formatter: convert bytes to KB, MB and GB in decimal or binary units and format numbers for any locale. Runs in your browser.
Sizes
- KiB
1,024 - MiB
1 - GiB
0.001 - TiB
0
Formatted number
- en-US
1,234,567,890
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Online Number and Byte Formatter
Convert byte counts into readable units and format large numbers with the locale conventions you choose. It helps developers display storage values and large counts clearly in dashboards, logs, and user-facing interfaces.
What this tool does and who uses it
This tool has two independent halves: converting a raw byte count into readable units, either binary (KiB/MiB/GiB/TiB) or decimal (KB/MB/GB/TB), and adding locale-aware grouping separators to a large number. Two concrete uses: a developer sanity-checking that a reported file size or memory value in an API response matches the human-readable number a user would expect, and a frontend developer previewing how a large number will actually display for users in a specific locale (a German user expects 1.234.567.890, not 1,234,567,890) before shipping it.
Worked example
1048576 bytes (exactly 220) converts in binary units to 1,024 KiB, exactly 1 MiB and 0.0009765625 GiB. Switch to decimal units and the same bytes are 1,048.576 KB and 1.0486 MB, because there 1 KB is 1000 bytes. Formatting 1234567890 shows 1,234,567,890 in en-US, 1.234.567.890 in de-DE, and 1,23,45,67,890 in hi-IN — the Indian numbering system groups by 2 digits after the first 3, not 3 digits throughout.
Common mistakes and edge cases
- KB and KiB are different sizes: 1 KB is 1000 bytes and 1 KiB is 1024 bytes. Storage makers and network speeds use the decimal names, memory and many file managers use the binary ones, so compare like with like. The gap grows with size, about 7% at GB.
- A locale that's syntactically malformed (like
de_DEwith an underscore instead of a hyphen) is caught and shown as "Invalid locale." A locale that's syntactically valid but doesn't correspond to anything real (like a made-upxx-YY) is reported as "Unknown locale" instead of quietly using your browser's default, so a typo does not go unnoticed. - A negative or non-numeric byte count shows an error message instead of sizes.