Accurate byte formats
Compare spaced hex, byte escapes, percent bytes, decimal, octal, code points, Unicode escapes, and UTF-16 with exact labels.
Encode, decode, validate, and inspect UTF-8
Use this UTF 8 text converter to encode or decode bytes, inspect code points and hidden characters, validate errors, and convert local files in your browser.
and hidden characters, validate errors, and convert local files in your browser.
Compare spaced hex, byte escapes, percent bytes, decimal, octal, code points, Unicode escapes, and UTF-16 with exact labels.
Find the exact byte offset for truncated, overlong, surrogate, continuation, and out-of-range UTF-8 sequences.
Choose a known source encoding, convert local text files to UTF-8, add an optional BOM, or download a successful batch as ZIP.
Choose Encode and paste ordinary Unicode text. The UTF 8 text converter turns the text into accurate UTF-8 bytes while keeping the original source visible. Select spaced hexadecimal, byte escapes, percent bytes, decimal bytes, octal bytes, or a validated custom template as the primary copy result.
For example, Café 你好 € contains 9 Unicode code points and becomes 16 UTF-8 bytes: 43 61 66 C3 A9 20 E4 BD A0 E5 A5 BD 20 E2 82 AC. ASCII letters use one byte each, while the accented letter, Chinese characters, and euro sign use multiple bytes. The result represents the same text; it does not translate or repair its meaning.
The reference rows keep code points, Unicode escapes, and UTF-16 code units separate from UTF-8. An emoji can be one code point, two UTF-16 code units, and four UTF-8 bytes. Those values are related, but they are not interchangeable notations.
Use Decode when a log, test fixture, protocol trace, or source file contains byte values instead of readable text. The page accepts spaced hex, 0x-prefixed bytes, backslash-x escapes, percent bytes, decimal bytes, and octal bytes. A guarded suggestion can recognize familiar input shapes, but the selected interpretation always remains visible and editable.
The UTF 8 text converter validates both the numeric tokens and the resulting byte sequence. Invalid input clears the stale result and identifies the failing byte. Messages distinguish a missing continuation byte, a truncated sequence, an overlong form, an encoded surrogate, an unexpected continuation byte, and a value above the Unicode range.
Swap moves a valid encoded result into Decode or a valid decoded result back into Encode. Copy always targets the one current primary result. Secondary representation rows have their own labels and copy actions, so they do not compete with or duplicate the primary workflow.
Spaced hex and backslash-x output both describe UTF-8 bytes. Percent bytes use percent-HH notation that is common around URL processing, but the notation itself is not another character encoding. Decimal and octal are number-base views of the same underlying bytes.
Unicode code points identify abstract characters, such as U+20AC for the euro sign. Unicode escapes are source-code notation, while UTF-16 units show the code units used by many programming environments. The UTF 8 text converter labels every row with what it is and what it is not, avoiding the semantic mixing found in many quick encoding pages.
Advanced custom formatting uses a small placeholder vocabulary for upper- or lowercase hex, decimal, octal, and the byte index. It substitutes values as plain text and never evaluates code. Standard presets remain the simplest choice for most users.
Text can look short while containing a byte-order mark, non-breaking space, zero-width space, joiner, or direction mark. The invisible-character panel labels supported marks in a read-only view. It never silently removes a character or rewrites the source.
The byte-budget panel compares UTF-16 code units, Unicode code points, grapheme clusters where the browser supports them, and UTF-8 bytes. Set a byte limit to check an API field, database column, message payload, or test condition. The page reports whether the current text is within that limit without pretending the same limit applies to every external system.
A bounded character map shows each code point and its UTF-8 bytes. It starts with 24 rows, and Show more adds another 24. This keeps the first interaction responsive and avoids creating a separate button or DOM element for every byte in a long value.
The UTF 8 text converter verifies that encoding and strict decoding return the exact original string. It also reports when NFC or NFD normalization would change the code-point sequence. The check is informational: it does not normalize the source automatically.
Normalization details are useful when visually identical strings fail equality checks, signatures, cache keys, database lookups, or tests. A precomposed accented character and a base letter followed by a combining mark can look the same while producing different bytes. The inspector makes that difference visible without deciding which form your application should store.
Open the File panel when the task starts with a local text file. Choose the known source encoding, select files within the displayed limits, decide whether the UTF-8 output needs a BOM, and start conversion. The source list includes only labels supported by the current browser; it is not a universal file-encoding detector.
Each selected file succeeds or fails independently. Download successful files one at a time, or download one standards-based ZIP when at least two files convert successfully. Streaming decoder semantics preserve multibyte boundaries where the browser exposes a file stream, and file work yields between results so a bounded batch does not monopolize the main thread.
The approved limits are 10 files, 5 MiB per file, and 25 MiB total. The UTF 8 text converter rejects larger selections before conversion. Files stay in the browser and are not uploaded by this workflow, but correct recoding still depends on choosing the correct source encoding. Keep an original copy until the converted text has been reviewed.
Core conversion uses browser-native encoding APIs and local deterministic helpers. The page does not send pasted text to a conversion service. File output also remains local unless you choose to download it. No account is required for the approved text and file workflow.
No converter can infer every unknown source encoding with certainty. The format suggestion for pasted bytes is a convenience, not a guarantee, and the file panel requires an explicit source label. The page does not promise automatic repair, unlimited or gigabyte files, compatibility with every database or programming language, language translation, or semantic AI conversion.
If the real task is repairing decorative Unicode or visibly broken mojibake, use Convert This Font to Normal. That separate TextKits page handles normalization and bounded repair. This page stays focused on UTF-8 bytes, explicit representations, validation, inspection, and known-source file recoding.
Practical answers about UTF-8 bytes, decoding errors, text files, BOM choices, and normalization differences.
Browser-local text conversion with exact labels. File work starts only when you ask.
Text to encode
Your source remains visible when you switch output formats.
Primary result
43 61 66 C3 A9 20 E4 BD A0 E5 A5 BD 20 E2 82 AC
9
code points
16
UTF-8 bytes
Exact
round trip
Seven labeled representations, hidden marks, byte budget, normalization, and bounded rows.
Programming-style byte notation
\x43\x61\x66\xC3\xA9\x20\xE4\xBD\xA0\xE5\xA5\xBD\x20\xE2\x82\xAC
URL-style byte notation, not another encoding
%43%61%66%C3%A9%20%E4%BD%A0%E5%A5%BD%20%E2%82%AC
The same UTF-8 bytes in base 10
67 97 102 195 169 32 228 189 160 229 165 189 32 226 130 172
The same UTF-8 bytes in base 8
103 141 146 303 251 040 344 275 240 345 245 275 040 342 202 254
Characters, not UTF-8 bytes
U+0043 U+0061 U+0066 U+00E9 U+0020 U+4F60 U+597D U+0020 U+20AC
JavaScript-style source notation
\u0043\u0061\u0066\u00E9\u0020\u4F60\u597D\u0020\u20AC
Code units, not UTF-8 bytes
0043 0061 0066 00E9 0020 4F60 597D 0020 20AC
Read-only labels never change the source.
No supported hidden marks detected.
9
UTF-16 units
9
code points
9
graphemes
16
UTF-8 bytes
Showing 9 of 9 code points.
| # | Character | Code point | UTF-8 bytes | Count |
|---|---|---|---|---|
| 1 | C | U+0043 | 43 | 1 |
| 2 | a | U+0061 | 61 | 1 |
| 3 | f | U+0066 | 66 | 1 |
| 4 | é | U+00E9 | C3 A9 | 2 |
| 5 | U+0020 | 20 | 1 | |
| 6 | 你 | U+4F60 | E4 BD A0 | 3 |
| 7 | 好 | U+597D | E5 A5 BD | 3 |
| 8 | U+0020 | 20 | 1 | |
| 9 | € | U+20AC | E2 82 AC | 3 |
Explicit source encoding · 10 files · 5.00 MiB each · 25.00 MiB total.
Files stay in this browser. The selected source label must be correct; no universal detection claim is made.
Each file succeeds or fails independently.
No repair, Base64, document extraction, unlimited files, or automatic unknown-encoding promise.
Use Convert This Font to Normal. This page stays focused on bytes and explicit recoding.
Runs locally in your browser.
Email us at [email protected] and include what you pasted, what you expected, and where it failed.