Sign up free

URL Encode and Decode

Percent-encode text for a URL or decode a messy link back to readable text, with its parameters listed.

About URL Encode and Decode

URL encode text before it goes into a link, or URL decode it back into readable text: a search term with spaces, a redirect address inside another URL, a name with accents or Chinese characters, or a value containing & or =. By default everything except letters, digits and a few safe symbols is encoded, which is right for a single parameter value.

Tick Whole URL to keep the colons, slashes, question marks, ampersands and equals signs that give a link its structure. Decode turns %E4%B8%AD back into 中, and with Treat + as a space on, it turns plus signs from form submissions into spaces. When the text is a web address, its query parameters are listed in a table, which makes long tracking links easy to read. It all runs in your browser. For text that contains many links, Extract Emails, Links and Numbers lists each one.

How to use URL Encode and Decode

  1. 1
    Choose Encode or Decode

    Encode for text going into a URL, Decode for a link you want to read.

  2. 2
    Paste the text or link

    The URL encode or decode result updates as you type.

  3. 3
    Set the options

    Tick Whole URL to keep the link structure, or Treat + as a space when decoding form data.

  4. 4
    Copy the result

    Copy it, and for links, check the table of query parameters.

Why use Cubfile for this

  • Component or whole URL

    Encode a single value strictly, or keep : / ? & = for a full address.

  • UTF-8 throughout

    Chinese, emoji and accented letters are encoded and decoded correctly.

  • Query parameter table

    Every key and value of a web address laid out in rows.

  • Clear error for broken codes

    A stray % or a cut-off sequence is reported instead of silently garbling the text.

FAQ

URL Encode and Decode: questions and answers

Should I URL encode the whole link or just one part?
Encode each parameter value on its own with the default setting. Use Whole URL only for a complete address that has spaces or non-English characters, because it keeps : / ? & = untouched. If a value is JSON, minify it first so the encoded link stays shorter.
Why does URL decode turn + into a space?
HTML forms send spaces as +, so Treat + as a space is on by default. Untick it if a real plus sign is in the data, for example in a phone number.
What does %20 mean in an encoded URL?
It's an encoded space. Every %XX pair is one byte in hexadecimal, and a Chinese character takes three bytes, which is why it becomes a long string like %E4%B8%AD.
Why do I get a broken % code error?
The text contains a % that isn't followed by two hex digits, or a multi-byte character was cut in half. Check the end of the pasted link.
Is my link sent to your server?
No. Encoding and decoding happen in your browser, so private links with tokens stay on your device. There's no usage limit.
Share URL Encode and Decode with a friendIt runs in any browser, and they can try it without signing up.

Related tools

JSON JSON FormatterFormat, validate and minify JSON, errors pointed out by line.
TXT Text CleanerRemove extra spaces, empty lines and broken line breaks in one click.
TXT Text CompareCompare two texts side by side and see every change.
TXT Word CounterCount words, characters, Chinese characters, lines and reading time live.
TXT Base64 Encode and DecodeEncode and decode Base64 text and files.
AaTXT Case ConverterUPPER, lower, Title, Sentence, camelCase, snake_case and more.
TXT Find and Replace TextReplace words in text in bulk, with regular expressions if you need them.
TXT Password GeneratorMake strong random passwords on your device.