pressione ⌘K para trocar de ferramenta
ENCODE & DECODE

URL Codificar / Decodificar

Codifique ou decodifique componentes de URL com codificação percentual.

local
url-encode
§01 SOBRE ESTA FERRAMENTA

Overview

Percent-encoding represents unsafe or reserved characters as %XX hex escapes so they can travel safely inside URLs. This tool wraps the browser’s native functions: component mode uses encodeURIComponent / decodeURIComponent, and Whole URI mode uses encodeURI / decodeURI, which preserves structural delimiters like :, /, ?, and &.

How to use

  1. Select Encode or Decode with the mode tabs.
  2. Leave Whole URI (encodeURI) unchecked to encode a single component (query value, path segment), or check it to process a full URL without breaking its delimiters.
  3. Type or paste into Input — the Result field updates as you type.

Examples

  • Component encode: a b&c=1a%20b%26c%3D1
  • Whole URI encode: https://example.com/?q=a bhttps://example.com/?q=a%20b (the ://, ?, = survive)
  • Decode: caf%C3%A9café

Notes

Encoding an already-encoded string double-escapes it (%20 becomes %2520), which is a common source of broken links. Non-ASCII input is encoded as UTF-8 bytes, so one character may expand to several %XX sequences.

FAQ
Is anything I paste here uploaded?
No. Encoding and decoding run entirely in your browser via the native encodeURIComponent, encodeURI, decodeURIComponent, and decodeURI functions. Nothing is sent to any server.
When should I check Whole URI instead of the default component mode?
Use component mode (the default) for individual values like query parameters — it encodes reserved characters such as /, ?, &, and =. Check Whole URI when you have a complete URL and want to keep its structure intact; encodeURI leaves those delimiters alone and only escapes characters that are invalid in a URI.
Why does decoding sometimes fail with an error?
A percent sign must be followed by two hex digits. Sequences like %ZZ or a trailing lone % form a malformed escape, and decodeURIComponent throws — the tool shows "Invalid input for decoding" instead of a result.