<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Encoding on JsonKit Blog</title>
    <link>https://jsokit.com/blog/tags/encoding/</link>
    <description>Recent content in Encoding on JsonKit Blog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>© 2025 JsonKit</copyright>
    <lastBuildDate>Sun, 10 May 2026 11:42:34 +0000</lastBuildDate>
    <atom:link href="https://jsokit.com/blog/tags/encoding/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>URL Encoding Decoded: From Percent Signs to encodeURIComponent</title>
      <link>https://jsokit.com/blog/posts/url-encoding-decoded-from-percent-signs-to-encodeuricomponent/</link>
      <pubDate>Sun, 10 May 2026 11:42:34 +0000</pubDate>
      <guid>https://jsokit.com/blog/posts/url-encoding-decoded-from-percent-signs-to-encodeuricomponent/</guid>
      <description>URL Encoding Decoded: From Percent Signs to encodeURIComponent Last week, I was debugging a payment callback where URL parameters were double-encoded, causing order ID parsing failures. It turned out many developers still treat URL encoding as just &amp;ldquo;throw encodeURIComponent at it.&amp;rdquo; Let me break down the actual mechanics and implementation details.&#xA;The Essence: Percent-Encoding URL encoding is officially called &amp;ldquo;percent-encoding.&amp;rdquo; The rule is straightforward: non-ASCII and special characters are represented as %XX, where XX is the character&amp;rsquo;s hexadecimal ASCII value.</description>
    </item>
    <item>
      <title>SVG Optimizer Implementation: From Regex to Performance</title>
      <link>https://jsokit.com/blog/posts/svg-optimizer-implementation-from-regex-to-performance/</link>
      <pubDate>Mon, 04 May 2026 11:34:21 +0000</pubDate>
      <guid>https://jsokit.com/blog/posts/svg-optimizer-implementation-from-regex-to-performance/</guid>
      <description>SVG Optimizer Implementation: From Regex to Performance Working on an icon library project, I noticed exported SVG files were often 50KB+. After optimization, they shrank by 60%. But manually uploading and downloading files every time was tedious. So I built my own SVG optimizer. Here&amp;rsquo;s how it works.&#xA;Why Are SVG Files So Large? A typical unoptimized SVG:&#xA;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt; &amp;lt;!DOCTYPE svg PUBLIC &amp;#34;-//W3C//DTD SVG 1.1//EN&amp;#34; &amp;#34;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&amp;#34;&amp;gt; &amp;lt;svg xmlns=&amp;#34;http://www.w3.org/2000/svg&amp;#34; viewBox=&amp;#34;0 0 24 24&amp;#34; width=&amp;#34;24&amp;#34; height=&amp;#34;24&amp;#34;&amp;gt; &amp;lt;!</description>
    </item>
    <item>
      <title>Morse Code Encoder/Decoder: From Telegraph to Web Audio API</title>
      <link>https://jsokit.com/blog/posts/morse-code-encoderdecoder-from-telegraph-to-web-audio-api/</link>
      <pubDate>Fri, 17 Apr 2026 12:35:40 +0000</pubDate>
      <guid>https://jsokit.com/blog/posts/morse-code-encoderdecoder-from-telegraph-to-web-audio-api/</guid>
      <description>Morse Code Encoder/Decoder: From Telegraph to Web Audio API I recently built a Morse code tool and dove into this 180-year-old encoding system. Looks simple, but the implementation has depth.&#xA;The Essence of Morse Code Morse code is the ancestor of binary encoding. Only two states: dot (short signal) and dash (long signal). Like 0 and 1 in computing.&#xA;The international Morse code character map:&#xA;const MORSE_MAP: Record&amp;lt;string, string&amp;gt; = { &amp;#39;A&amp;#39;: &amp;#39;.</description>
    </item>
    <item>
      <title>JSON to Excel Tool Implementation: From Data Transformation to Browser-Side File Generation</title>
      <link>https://jsokit.com/blog/posts/json-to-excel-tool-implementation-from-data-transformation-to-browser-side-file-generation/</link>
      <pubDate>Sun, 08 Mar 2026 15:59:12 +0000</pubDate>
      <guid>https://jsokit.com/blog/posts/json-to-excel-tool-implementation-from-data-transformation-to-browser-side-file-generation/</guid>
      <description>JSON to Excel Tool Implementation: From Data Transformation to Browser-Side File Generation Written: May 7, 2026 at 21:14&#xA;As a frontend developer, data export requirements come up frequently. Users want to export JSON data returned from APIs into Excel. The product manager says &amp;ldquo;just add a button.&amp;rdquo; Sounds simple, but when you actually implement it, you need to consider encoding issues, data type handling, and file format compatibility. Let&amp;rsquo;s talk about how JsonKit&amp;rsquo;s JSON to Excel tool works under the hood.</description>
    </item>
    <item>
      <title>Implementing JSON to CSV Conversion: From Data Structure to Table Format</title>
      <link>https://jsokit.com/blog/posts/implementing-json-to-csv-conversion-from-data-structure-to-table-format/</link>
      <pubDate>Sat, 07 Mar 2026 16:25:43 +0000</pubDate>
      <guid>https://jsokit.com/blog/posts/implementing-json-to-csv-conversion-from-data-structure-to-table-format/</guid>
      <description>Implementing JSON to CSV Conversion: From Data Structure to Table Format I was recently working on a data export feature that required converting API JSON responses to CSV for users to download. I thought it would be simple string concatenation, but I discovered quite a few pitfalls - quote escaping, special characters, encoding issues&amp;hellip; So I decided to document these details.&#xA;CSV Format Specification (RFC 4180) Before writing code, let&amp;rsquo;s understand the CSV rules:</description>
    </item>
    <item>
      <title>HTML Entity Encoding: From XSS Prevention to Character Escaping Implementation</title>
      <link>https://jsokit.com/blog/posts/html-entity-encoding-from-xss-prevention-to-character-escaping-implementation/</link>
      <pubDate>Tue, 17 Feb 2026 13:57:34 +0000</pubDate>
      <guid>https://jsokit.com/blog/posts/html-entity-encoding-from-xss-prevention-to-character-escaping-implementation/</guid>
      <description>HTML Entity Encoding: From XSS Prevention to Character Escaping Implementation Building a content management system recently, I needed to safely display user-submitted text on pages. Direct rendering? XSS attacks await. Escape everything? Garbage output. That&amp;rsquo;s where HTML entity encoding comes in.&#xA;What Are HTML Entities HTML entities represent special characters using specific character sequences. For example, &amp;lt; becomes &amp;amp;lt;, &amp;gt; becomes &amp;amp;gt;. These seemingly cryptic strings solve two core problems:</description>
    </item>
    <item>
      <title>Building a Document Format Converter: From TXT/Markdown/HTML to Any Format</title>
      <link>https://jsokit.com/blog/posts/building-a-document-format-converter-from-txtmarkdownhtml-to-any-format/</link>
      <pubDate>Sun, 08 Feb 2026 17:58:53 +0000</pubDate>
      <guid>https://jsokit.com/blog/posts/building-a-document-format-converter-from-txtmarkdownhtml-to-any-format/</guid>
      <description>Building a Document Format Converter: From TXT/Markdown/HTML to Any Format Every time I need to embed a Markdown document into a webpage or extract plain text from HTML, I end up installing desktop software or writing scripts. But the core logic of document format conversion isn&amp;rsquo;t that complex — browser APIs can handle most cases. Let me walk through building a pure frontend document converter.&#xA;The Essence: Re-encoding Text Document format conversion sounds fancy, but it boils down to three steps: read source file → parse content structure → re-encode in target format.</description>
    </item>
    <item>
      <title>Building a Code Sharing Tool: URL Hash Storage and Base64 Encoding Techniques</title>
      <link>https://jsokit.com/blog/posts/building-a-code-sharing-tool-url-hash-storage-and-base64-encoding-techniques/</link>
      <pubDate>Fri, 30 Jan 2026 15:09:21 +0000</pubDate>
      <guid>https://jsokit.com/blog/posts/building-a-code-sharing-tool-url-hash-storage-and-base64-encoding-techniques/</guid>
      <description>Building a Code Sharing Tool: URL Hash Storage and Base64 Encoding Techniques Recently, I built a code sharing tool that requires a &amp;ldquo;no backend, permanent validity&amp;rdquo; sharing mechanism. After researching several approaches, I chose URL Hash + Base64 encoding - simple and reliable.&#xA;Why URL Hash Storage? Traditional code sharing tools use two approaches:&#xA;Backend database storage - Store code in database, generate short links. Pros: short links. Cons: needs backend, storage cost, links can expire.</description>
    </item>
    <item>
      <title>Base64 Encoding/Decoding: From btoa to Full Unicode Support</title>
      <link>https://jsokit.com/blog/posts/base64-encodingdecoding-from-btoa-to-full-unicode-support/</link>
      <pubDate>Sat, 24 Jan 2026 15:39:10 +0000</pubDate>
      <guid>https://jsokit.com/blog/posts/base64-encodingdecoding-from-btoa-to-full-unicode-support/</guid>
      <description>Base64 Encoding/Decoding: From btoa to Full Unicode Support I recently worked on a project requiring safe text data transmission, and Base64 encoding was unavoidable. While I&amp;rsquo;ve used it countless times, implementing a reliable tool revealed some interesting details worth sharing.&#xA;What is Base64? Simply put, Base64 is a method to represent binary data using 64 printable characters:&#xA;Uppercase letters A-Z (26 characters) Lowercase letters a-z (26 characters) Digits 0-9 (10 characters) + and / (2 characters) Plus = for padding at the end.</description>
    </item>
    <item>
      <title>The Encoding Principles Behind Barcodes: Building an Online Barcode Generator</title>
      <link>https://jsokit.com/blog/posts/the-encoding-principles-behind-barcodes-building-an-online-barcode-generator/</link>
      <pubDate>Sat, 24 Jan 2026 12:32:47 +0000</pubDate>
      <guid>https://jsokit.com/blog/posts/the-encoding-principles-behind-barcodes-building-an-online-barcode-generator/</guid>
      <description>The Encoding Principles Behind Barcodes: Building an Online Barcode Generator Recently added a barcode generation feature to a project. Turns out those black-and-white stripes have some interesting encoding rules underneath.&#xA;What is a Barcode? A barcode converts numbers or letters into alternating black and white stripes. When a scanner reads it, black bars absorb light while white spaces reflect it, generating electrical signals that decode back to the original content.</description>
    </item>
  </channel>
</rss>
