Using Firefox and Firebug to Encode and Decode URLs with encodeURI/decodeURI
This guide shows how to install the latest Firefox and Firebug, then use the console to encode and decode URLs via JavaScript's encodeURI and decodeURI functions, including step‑by‑step commands and explanations of why the latest tools are recommended.
The article explains how to use the latest Firefox browser together with the Firebug extension to perform URL encoding and decoding directly in the console.
Required tools: install the latest Firefox, install Firebug from www.getfirebug.com , open Firebug and switch to the Console panel.
Encoding: In the console type encode to get autocomplete suggestions such as encodeURI , then complete the command encodeURI('张三'); . Press Enter and the console returns the percent‑encoded string, e.g. "%E4%BD%95%E4%BC%9F%E5%B9%B3" .
Decoding: Similarly type decodeURI('%E4%BD%95%E4%BC%9F%E5%B9%B3'); and the console outputs the original Chinese characters “张三”.
The author notes that the latest Firefox is chosen for speed and compatibility, while the latest Firebug provides autocomplete and saves time looking up documentation.
Author: He Weiping, Qunar Travel Division, search technology researcher and database researcher, former Yahoo China search engineer, with extensive experience in search, distributed systems, databases, and cluster design.
Qunar Tech Salon
Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.