# Encoding & IDs

URL Encode / Decode

Encode special characters for URLs or decode percent-encoded strings safely.

Updated

Component vs Full URL Safe decode errors Copy ready

Loading URL Encoder…

What this page sends

  • Your input: Processed in this tab and not sent to a server.
  • Share links: Share links put a Base64 copy of your input and output in the URL itself (after #d=). Anyone with the link can read it, so don't share a link that contains secrets.
  • Editor: On desktop screens the code editor (Monaco) is downloaded from cdn.jsdelivr.net; phones get a built-in lightweight editor instead.
  • Page load: Loading the page requests HTML, scripts and images from ByteKiln, fonts from Google Fonts, and sends Google Analytics page views, tool-usage events and catalog interactions (tool/category IDs, result status and whether a click followed search — never your input, output or search terms). Privacy & sharing

How the URL Encode / Decode Works

The ByteKiln URL Encoder encodes and decodes URL strings and percent-encoded characters in your browser. Choose Component mode for individual query values or Full URL mode to encode a complete address.

Component vs. Full URL mode

Component mode (encodeURIComponent) encodes all special characters including ?, &, =, /, and # — use it for individual query parameter values. Full URL mode (encodeURI) preserves structural characters so the address stays valid.

Decoding percent-encoded strings

Switch to Decode to convert %XX sequences back to readable text. Malformed or incomplete percent sequences are detected and shown as a clear error message rather than producing garbled output.

When to URL-encode

Encode values before appending them to query strings or embedding them in path segments. Special characters like spaces, &, =, and # have reserved meanings in URLs and must be encoded to avoid silently breaking requests.

Limitations

  • Component mode uses encodeURIComponent and Full URL mode uses encodeURI, so a space becomes %20. HTML form bodies (application/x-www-form-urlencoded) use + for spaces, and a + in input to decode stays a literal +.
  • Decoding assumes UTF-8. Percent-encoded bytes from a legacy charset such as Windows-1252 produce an error instead of the original characters.
  • It encodes text, not URL structure: it won't normalize a URL, punycode a domain, or tell you whether a query string is valid for a particular server.

FAQ

Short answers for the things developers usually ask before trusting a tool.

What is the difference between Component and Full URL mode?

Component mode uses encodeURIComponent, which encodes everything including ?, &, /, =, and # — use it for individual query string values. Full URL mode uses encodeURI, which preserves URL structure characters so the full address remains navigable.

When should I URL-encode a string?

URL-encode values before including them as query parameters or path segments in a URL. Special characters like spaces, &, =, and # have reserved meanings in URLs and must be encoded to avoid breaking the request.

Is my URL or query string sent to a server?

No. Encoding and decoding run in your browser; the input is not sent to a ByteKiln server. If you press Share, the link itself carries a readable copy of your input, so don't share links that contain secrets.

What happens with malformed percent-encoded input?

The decoder detects invalid percent sequences and shows a readable error message rather than throwing silently or returning garbled output.

What is percent-encoding?

Percent-encoding (also called URL encoding) replaces unsafe characters with a % sign followed by two hexadecimal digits representing the character's UTF-8 byte value. For example, a space becomes %20 and & becomes %26.

Related tools

Useful follow-ups when one conversion usually turns into three more.

Want the background and worked examples? There's a longer write-up.

Read the URL Encoder guide

Related guides