XTools Logo
XTools
Blog
/
JSON Formatter & YAMLXML FormatterCode Formatter & MinifierJSON to TypeScriptMarkdown ⇄ HTMLMermaid Diagram EditorRegex TesterJWT DecoderUUID GeneratorEncode & DecodeCron Expression BuildercURL Command BuilderMeta Tag GeneratorPX to REM & Line HeightCSS GeneratorChmod Calculator

© 2026 XTools. All rights reserved.

Privacy PolicyContact Us

    Encode & Decode

    Base64, URL, hex, Base32, HTML entities, and binary text — for text and files
    • Files never leave your device
    • Runs in your browser
    • Free, no sign-up, no watermark

    0 characters · 0 bytes

    0 characters

    Both sides are editable: type in either box and the other updates.

    Related tools

    • JSON Formatter & YAML
    • XML Formatter
    • Code Formatter & Minifier
    • JSON to TypeScript
    • Markdown ⇄ HTML
    • Mermaid Diagram Editor
    • Regex Tester
    • JWT Decoder
    • UUID Generator
    • Cron Expression Builder
    • cURL Command Builder
    • Meta Tag Generator
    • PX to REM & Line Height
    • CSS Generator
    • Chmod Calculator

    How to use Encode & Decode

    Encode and decode text as Base64, URL encoding, hex, Base32, binary, HTML entities, Unicode escapes, or quoted-printable. Both boxes are editable, so you can type on either side. A File tab turns any file into Base64, a data URI, or a hex dump, and turns Base64 back into a file.

    1. 1

      Stay on the Text tab, or switch to File for binary files.

    2. 2

      Pick an Encoding, such as Base64, URL, or Hex.

    3. 3

      Type in Plain text to encode, or paste into the encoded box to decode. The other side updates as you type.

    4. 4

      Adjust options like URL-safe alphabet or Full URL scope if needed, then copy the result.

    Frequently asked questions

    Are my text and files uploaded?

    No. Encoding and decoding happen in your browser, and files are read locally.

    What's the difference between Component and Full URL?

    Component escapes everything except letters, digits, and - _ . ! ~ * ' ( ), which suits query values and path segments. Full URL keeps : / ? # & = intact so a whole URL stays usable.

    How do I turn a Base64 string back into an image or file?

    Open the File tab, choose Text → file, and paste the Base64 or data URI. The tool detects the file type, previews images, and lets you name and download the file.

    Why does decoding say the bytes are not valid UTF-8?

    The Base64 probably holds a binary file, not text. Click Decode as file to open it in the File tab and save it.

    Does it handle emoji and non-Latin text?

    Yes. Text is encoded as UTF-8, so Chinese, accented letters, and emoji round-trip correctly.