File to URL encoder

Percent-encode a file or text in your browser: nothing is uploaded, there is no limit on how much you encode, and you choose whether to encode only the unsafe bytes or every byte.

Drop your file here

Choose file

Elk soort bestand · of plak met Ctrl+V

How it works

  1. Choose a file or type text

    Drop a file in the box, choose it on your device or type text.

  2. Encoded instantly

    The URL-codering result appears at once; change the options if you like.

  3. Copy or download

    Copy the text with one click or save it as a .txt file.

Encode everything

Tick Also encode letters and digits to turn every single byte into a %XX code. That is rarely needed, but some filters and tests ask for it.

Why URLs need encoding

A web address may only hold letters, digits and a few symbols. Everything else, such as spaces, &, ?, #, accents and emoji, has to be written as % followed by two hexadecimal digits. Characters outside plain ASCII become several codes, because they are encoded as UTF-8 first: é is %C3%A9, and an emoji takes four codes.

When it matters

  • A query string where a value contains &, = or a space: without encoding it breaks the parameters.
  • A redirect or next= parameter that contains a whole URL.
  • Mailto links and links in templates that contain special characters.

Space: %20 or +?

Percent-encoding writes a space as %20. Form data (the application/x-www-form-urlencoded format) uses +. Both are used in practice, but only %20 is right everywhere, which is why this tool uses it. When you decode form data, tick + means a space in URL encoding to file.

For a quick snippet of text there is also URL encode. To put a file in a text field, file to Base64 is a better fit than percent-encoding.

Private by design

The encoding happens in your browser. Nothing is uploaded.

Frequently asked questions

What is the difference between %20 and +?

%20 is a space in any part of a URL. + means a space only in form data and query strings in the old form format. This tool writes %20.

When should I encode everything?

Rarely: some filters and tests want every byte as %XX. Normally the unsafe bytes are enough.

Why are accents encoded to several codes?

Characters are converted to UTF-8 bytes first, and each byte becomes one %XX code. An é is two bytes, so %C3%A9.

Is my file uploaded?

No. The encoding happens in your browser.