🔒 Runs entirely in your browser. Nothing is uploaded.

Using an AI agent or a script? Call this tool as an API

AI agents and scripts can call this tool directly, to check their work or look something up, and get JSON back with the same answer this page gives. No key needed.

GET https://digitalgreenhouse.com.au/api/tools/url-encode?text=caf%C3%A9%20%26%20cake%3F&mode=encode
  • text — string, required. Text to encode or decode.
  • mode — string, one of encode | decode, default encode. encode or decode.
  • scope — string, one of component | full, default component. component = one query value or path segment; full = a whole URL.

The API answers from our server, and our code doesn’t store what you send. Fair-use limits apply. API guide · all endpoints (JSON) · OpenAPI

When do you need URL encoding?

URLs are only allowed to contain a limited set of characters. Spaces, ampersands, question marks, slashes, accented letters and emoji all have to be “percent-encoded” — a space becomes %20, an ampersand becomes %26, and so on — otherwise they break the link or get misread as URL structure. You’ll hit this whenever you build a link with user input, pass data in a query string, or share a URL with non-English text.

Component vs full URI

Component (encodeURIComponent) encodes nearly everything, including / ? & = — use it for a single value you’re dropping into a query string. Full URI (encodeURI) leaves the structural characters alone so a whole address stays usable — use it when you’re encoding an entire URL. This tool handles full Unicode correctly, so accented characters and emoji round-trip cleanly.

Why is a space sometimes %20 and sometimes +?
In the path it’s %20. In old-style HTML form submissions a space could be a +. This tool uses the modern %20 form, which is always safe.
Is this the same as Base64?
No — Base64 turns binary into safe text, while URL encoding makes text safe to put in a web address. Base64 has its own tool.

AI workshops for teams

Get your team confident with AI.

Interactive half-day and full-day workshops in Copilot, Claude or ChatGPT, run at your office - in Sydney, or anywhere we can fly to.