Skip to main content
Ink·tab

Percent-encoding · component / uri

Make any string safe to drop into a URL — encode and decode both ways.

Encoded result
hello%20world%20%26%20%EC%95%88%EB%85%95

Everything happens in your browser. Nothing is uploaded.

When to use it

Putting Unicode, spaces, or symbols into a URL safely. Or doing the reverse: turning a %E3%81%82%E3%81%84 log line back into something a human can read.

componentURI vs uri

Two encoding scopes:

  • componentURI — same as encodeURIComponent. Escapes reserved characters too (: / ? # & =). Use it for query values, path segments, and POST bodies.
  • uri — same as encodeURI. Leaves reserved characters intact and only escapes spaces and non-ASCII. Use it when you have a full URL string and don't want its structure rearranged.

When in doubt pick componentURI. Reach for uri only when you're making a complete URL safe in one shot.

Decoding

If the input isn't valid percent-encoded text, decoding fails. The tool surfaces an error so you can see where the problem is, instead of silently chewing on bad bytes.

Tokens / keys inside query strings safe

encodeURIComponent · encodeURI both call stdlib directly. URLs containing Hangul, emoji, or auth tokens all process inside the page.

Frequently asked questions

What's the difference between encodeURIComponent and encodeURI?
encodeURIComponent is stricter — it encodes URL-structural characters like `/`, `?`, `#`, and `&`. encodeURI preserves URL structure and only encodes unsafe characters. Use Component for query values, URI for whole URLs.
Are Hangul and emoji handled safely?
Yes. Conversion happens at the UTF-8 byte level — characters like `한글` become `%ED%95%9C%EA%B8%80`.
What happens with malformed % sequences during decoding?
An error is shown with the location, so you can fix the input. The whole decode fails (rather than partial) to prevent using a corrupted result.