URL encode or decode

Percent-encode text so it is safe inside a URL, or turn %-escapes back into readable text.

or drop it here · files stay on your device
We count formats and sizes. Filenames stay private unless you opt in.

Direction
Processed on this device
  • Runs on your device
  • No sign-up or watermark
  • No fixed file size cap

The short answer

To URL encode or decode text, save it in a .txt file, choose it here and pick Encode or Decode. Encoding uses the browser’s encodeURIComponent, so spaces become %20 and characters like & and / are escaped too. It runs in your browser and nothing is uploaded.

How to URL encode or decode text

  1. STEP 1

    Save the text to a file

    Put the value or URL in a plain .txt file. Remove a trailing blank line if you do not want %0A at the end.

  2. STEP 2

    Choose the file

    Select or drop the .txt file. It is read in your browser and never sent anywhere.

  3. STEP 3

    Pick the direction

    Choose Encode or Decode in the Direction menu. The preview updates as you switch.

  4. STEP 4

    Copy the result

    Copy the output from the preview with the Copy button, or download it as a .txt file.

What percent-encoding is

URLs may only contain a limited set of characters, and some, like ? & = / and #, have jobs to do. Percent-encoding writes any other character as % followed by the hex value of each of its UTF-8 bytes, so a space becomes %20 and é becomes %C3%A9.

There are two common rule sets. Component encoding escapes the reserved characters too, which is what you want for a single query parameter value. Form encoding, used by HTML forms, writes spaces as + instead of %20. This tool uses component rules.

What survives, and what does not

Encoding runs encodeURIComponent over the whole file, leaving only letters, digits and - _ . ! ~ * ' ( ) unescaped. Decoding runs decodeURIComponent and stops with a clear error if it meets a broken escape such as a lone %. The report shows the character count before and after.

What you keep

Every character, including emoji and accented letters, encoded as UTF-8

Exact round trips: decoding the encoded text gives back the original

What you lose

There is no full-URL mode: : / ? & and = are always escaped, so encode only the part that needs it

A + is not decoded to a space, so form-encoded text keeps its plus signs

A trailing line break in the file is encoded too, as %0A

There is no paste box yet; the text must be in a .txt file

Honest limits are published on every tool page. If a tool cannot do something well, it says so here rather than letting you find out after the download.

URL encode or decode at a glance

InputTXT
OutputTXT
RulesencodeURIComponent / decodeURIComponent
SpacesEncoded as %20, not +
BatchOne file at a time
Runs onYour device, in the browser

If something goes wrong

It says the text contains an invalid percent-escape

There is a % that is not followed by two hex digits, or an escape sequence that is not valid UTF-8. Encode a literal percent sign as %25.

My whole URL got escaped

Component rules escape : / ? and & as well. Encode only the parameter values, then put them back into the URL.

URL encode or decode questions

What is the difference between %20 and + for a space?

Both mean a space in a query string, but %20 is the standard percent-encoding and + comes from HTML form encoding. This tool writes %20 and leaves + untouched when decoding.

Should I use encodeURI or encodeURIComponent?

Use encodeURIComponent for a single value such as a query parameter, since it escapes & and =. This tool uses it. encodeURI, for a whole URL, is not offered.

How do I decode a URL with %20 in it?

Save the URL in a .txt file, choose Decode and run it. Every %XX escape is turned back into its character.

Does URL encoding hide or encrypt data?

No. Anyone can reverse it in a second. It only makes text safe to put in a URL.

Is my text uploaded?

No. Encoding and decoding use functions built into your browser, so redirect URLs carrying tokens or email addresses stay on your device.

One of 153 file tools and planned additions. Built and tested by Arin Prajapati, last checked against the code on . canonical: https://damnfiles.com/url-encode
Analytics preferences

Help us understand which tools and file types people use. File contents always stay on your device.

Filename sharing is optional and off by default. Names can contain personal information. Changes apply to future events; disabling sharing does not delete earlier records.

Read our privacy policy