Encode, decode, validate, and inspect UTF-8

UTF 8 Text Converter

Use this UTF 8 text converter to encode or decode bytes, inspect code pointsRead more

and hidden characters, validate errors, and convert local files in your browser.

Accurate byte formats

Compare spaced hex, byte escapes, percent bytes, decimal, octal, code points, Unicode escapes, and UTF-16 with exact labels.

Strict diagnostics

Find the exact byte offset for truncated, overlong, surrogate, continuation, and out-of-range UTF-8 sequences.

Bounded local files

Choose a known source encoding, convert local text files to UTF-8, add an optional BOM, or download a successful batch as ZIP.

Encode text as UTF-8 bytes

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.

Decode supported UTF-8 byte notation

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.

Understand hex, escapes, percent bytes, and code points

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.

Inspect hidden characters and byte limits

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.

Verify round trips and Unicode normalization

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.

Convert known-source text files to UTF-8

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.

Privacy, accuracy, and clear limits

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.

UTF 8 text converter FAQ

Practical answers about UTF-8 bytes, decoding errors, text files, BOM choices, and normalization differences.

What is UTF-8 text?

+
UTF-8 is a variable-length way to encode Unicode code points as bytes. ASCII characters use one byte, while many accented characters, symbols, CJK characters, and emoji use multiple bytes.

How do I convert a string into UTF-8?

+
Paste the string in Encode mode and choose the byte notation you need. Spaced hex shows the actual UTF-8 byte values, while the Advanced panel keeps code points, Unicode escapes, and UTF-16 units in separately labeled rows.

How do I decode UTF-8 bytes?

+
Choose Decode, select or confirm the input notation, and paste the byte values. The UTF 8 text converter validates tokens and UTF-8 structure before returning readable text, with an exact offset when validation fails.

How do I convert a text file to UTF-8?

+
Open the File panel, choose the known source encoding, select files within the displayed limits, choose whether to add a UTF-8 BOM, and run conversion. Download each successful result or one ZIP for a successful batch.

Can this page detect an unknown file encoding automatically?

+
No. Automatic detection is not reliable for every text file. Choose the known source encoding and review the converted result before replacing an important original.

What does a UTF-8 BOM do?

+
A UTF-8 BOM is the byte sequence EF BB BF at the start of a file. Some software uses it as an encoding hint, while other workflows prefer UTF-8 without it. The file panel makes the choice explicit.

Why do identical-looking strings have different bytes?

+
They may use different normalization forms, combining marks, non-breaking spaces, zero-width characters, or direction marks. Use the invisible-character and normalization panels to inspect the difference without automatically rewriting it.