freesabai

Developer tools

URL encode and decode

Turn text into the codes used in links (%E0%B8…) and back. Thai in links comes out right, you can choose the encoding style, decode old links that use Windows-874, and take a URL apart into its parts with its parameters decoded. It runs in your browser.

This tool needs JavaScript. If you still see this after a few seconds, JavaScript is switched off in your browser or the page did not load completely: turn JavaScript on or reload the page.

How to use it

  1. Choose "Encode" or "Decode", then type or paste. The result appears at once.
  2. Encode: choose "Component" for a value that goes inside a query (it also encodes / ? & =), or "Whole URL" to encode only characters that cannot be used and keep the structure of the URL.
  3. To look at the parameters of a long link, choose "Take a URL apart" and you get the protocol, host, path and every parameter, decoded.

Frequently asked questions

What are the %E0%B8%... in a link?

That is Thai encoded in a link (percent-encoding). The browser turns each character into UTF-8 bytes and writes each byte as % and two hex digits. For example "ไทย" is %E0%B9%84%E0%B8%97%E0%B8%A2. Paste it in "Decode" to get the text back.

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent encodes everything that is not a letter, a digit or - _ . ! ~ * ' ( ). Use it for a single value that goes inside a URL. encodeURI leaves : / ? # & = alone. Use it for a whole URL that has spaces or Thai in it.

I decode an old Thai link and get garbled characters

Older Thai sites encoded links in Windows-874 (TIS-620), not UTF-8. For example %CA%C7%D1%CA%B4%D5 is "สวัสดี". In "Decode" mode set the character set to "Old Thai Windows-874" and it reads correctly.

Good to know

Your data stays on your device

Everything runs in your browser. What you type, paste or open is not sent to freesabai's servers or anyone else's, and is not kept in the browser: close the page and it is gone. The site only counts how many times this page was opened and how many times someone copied or saved a result (never what was pasted or the result, and you can switch the counting off in the footer; see the privacy policy).

Report a problem or suggest an idea

Found a bug, or want this tool to do more? Tell us on the feedback page. No sign-up.

Other developer tools

JSON and data

Encoding, hashes and tokens

Generators

Time, numbers and colour

Text and code