分类
编码与数据
本分类下的所有工具与文章,集中在一处。
工具
Base64、Base32、十六进制和百分号编解码器
将文本编码为 Base64、URL 安全 Base64、Base32、十六进制或百分号编码,并将其中任意一种解码回来。容忍缺失的填充和空白,并标记二进制(非 UTF-8)结果。完全在你的浏览器中运行。
JSON ↔ YAML Converter
Convert JSON to block-style YAML or YAML back to JSON, entirely in your browser. Parse errors point to the exact line and column, and conversion notes flag the lossy edges like dropped comments and expanded anchors.
JSON Formatter & Validator
Validate, pretty-print, minify, and sort JSON. Parse errors point to the exact line, column, and path; duplicate keys are flagged; and large numbers are preserved exactly. Runs entirely in your browser.
Multi-time-zone meeting planner
One instant, read in every attendee's IANA time zone: local time, UTC offset, day shift, and a working-hours flag. DST is whatever the zone database says for that date, which is exactly why you plan with a real one.
Roman numerals converter
Numbers to numerals and back, with the canonical subtractive form, the place-by-place construction, and honest validation: IIII is accepted and explained, IL is refused with the rule it breaks.
Time calculator
Exact time arithmetic: the span between two instants, or an instant plus or minus a duration, in ISO 8601 or plain shorthand. Months and years are refused honestly: they are calendar units with no single exact length.
Unix 时间转换器
输入一个 Unix 时间戳——秒、毫秒、微秒或纳秒,自动识别——或一个 ISO-8601 日期,即可读取它的所有常见格式。全部在你的浏览器中完成。
文章
JSON vs YAML: What Converts Cleanly and What Does Not
YAML was designed so that every JSON document is also valid YAML, which is why conversion between them usually just works. The interesting part is the edges: comments, anchors, multiple documents, and YAML-only types that have no JSON equivalent.
阅读The Anatomy of a URL
Every URL is built from the same handful of parts defined by RFC 3986: scheme, authority (userinfo, host, port), path, query, and fragment. What each part means, how a parser tells them apart, and where the boundaries actually fall.
阅读The JSON Grammar: Six Types and a Few Strict Rules
JSON is smaller than it looks. The whole format is six value types and a handful of structural characters, governed by rules that are stricter than most people remember: no comments, no trailing commas, and keys that must be quoted strings.
阅读What Unix Time Actually Is
Unix time is a single integer: the number of seconds since 1970-01-01T00:00:00Z, the epoch. It is time-zone independent, compact, and sortable, which is why it underpins almost every system clock, log line, and API timestamp. Converting it to a calendar date is pure arithmetic.
阅读字节、码点与 UTF-8
字符与字节的区别、为何存在 Unicode 和 UTF-8,以及这与 Base64 有何关系。
阅读Base64 与 Base64URL,详解
二进制数据如何变成可安全传输的文本、为何存在填充,以及 URL 安全变体中有何不同。
阅读JSON Numbers and the Precision Trap
JSON puts no limit on the size or precision of a number, but most parsers quietly convert every number to a 64-bit float. That mismatch silently corrupts large integers and exact decimals, which is why a formatter should preserve the original digits.
阅读Query Strings: Parameters, Plus Signs, and Repeated Keys
The part of a URL after the question mark looks simple but hides real ambiguity: how parameters are separated, why a plus sign sometimes means a space, how repeated keys behave, and why there is no single governing standard.
阅读Seconds, Milliseconds, Microseconds, Nanoseconds: Telling Epoch Units Apart
The same instant can be written as 1700000000, 1700000000000, or larger, depending on whether the timestamp counts seconds, milliseconds, microseconds, or nanoseconds. Mixing them up is a classic bug. You can almost always tell which is which from the number's magnitude.
阅读YAML Type Coercion and the Norway Problem
YAML guesses the type of every unquoted scalar, and its guesses are surprising: the country code NO becomes false, a version like 1.0 becomes a number, and a zero-padded code loses its zeros. Knowing the rule is the key to safe conversion.
阅读Base64URL 与 URL 安全字母表
为什么 JWT 和 PKCE 使用不同的 Base64 字母表、改变的两个字符,以及填充会发生什么。
阅读Duplicate Keys in JSON: Legal, Dangerous, and Worth Catching
JSON syntax allows the same key to appear more than once in an object, but the specification does not say what that means. Different parsers resolve it differently, which makes duplicate keys a quiet source of bugs and even security issues.
阅读JSON and YAML in Practice: APIs, Declarations, and Orchestration
The split is not random: APIs and machine-to-machine declarations tend to be JSON, while human-authored orchestration and pipeline files tend to be YAML. Understanding why each domain chose what it did explains when converting between them is useful.
阅读The Year 2038 Problem
A signed 32-bit integer can count seconds only up to 2147483647, which falls on 2038-01-19T03:14:07Z. One second later it overflows and wraps to a negative number, throwing affected systems back to 1901. It is Y2K's quieter successor, and the fix is a wider integer.
阅读URL Encoding and Internationalized Hosts
URLs are restricted to a small set of ASCII characters, so everything else is encoded. Percent-encoding handles paths and queries; punycode handles non-ASCII host names. How both work, and why internationalized hosts are a phishing concern.
阅读Base64 出现的地方:data URI、MIME、PEM 和 Basic auth
二进制被包入文本的真实场所、这样做的体积代价,以及为何认证头中的 Base64 不是加密。
阅读ISO 8601, RFC 3339, and the HTTP Date
Once a Unix timestamp is turned back into a human date, it gets written in one of a few standard text formats. ISO 8601 is the broad standard, RFC 3339 is its strict internet profile, and the HTTP date is the odd one out. Knowing the difference saves a lot of parsing grief.
阅读JSON String Escapes and Unicode
Inside a JSON string, a few characters must be written as escapes, and any character at all can be written as \uXXXX. The rules are small but strict, and the one that catches people is how characters beyond the basic plane, like emoji, need a surrogate pair.
阅读YAML Anchors, Aliases, and Merge Keys
YAML can define a value once and reuse it with an anchor and alias, and merge one mapping into another with a merge key. None of this exists in JSON, so converting expands and duplicates it. This covers the syntax, what happens on conversion, and the denial-of-service trap they enable.
阅读Base32 详解
为什么 Base32 用大小写不敏感、无歧义的字母表换取体积,它的 5 位分组如何工作,以及它出现在哪里(TOTP 密钥、onion 地址、DNS)。
阅读Trailing Commas, Comments, and the JSON5 Family
Strict JSON has no comments and no trailing commas, which surprises people whose editor accepts both. The reason is that JSON is a minimal interchange format, and the tolerant variants (JSONC, JSON5) are separate things. Knowing which is which avoids config files that break in another tool.
阅读Why Unix Time Ignores Leap Seconds
UTC occasionally inserts a leap second to stay aligned with the Earth's rotation, but Unix time pretends every day is exactly 86,400 seconds long. That deliberate simplification means a Unix timestamp is not a true count of elapsed seconds since the epoch — and it is the right trade-off for civil time.
阅读YAML Block Scalars and Multiline Strings
YAML has two ways to write a multiline string, and they treat newlines differently: literal style keeps them, folded style turns them into spaces. Chomping indicators then decide what happens to the trailing newline. Getting these wrong is why an embedded script or certificate comes out subtly mangled.
阅读Formatting, Minifying, and Canonical JSON
Whitespace does not change what JSON means, so pretty-printed and minified JSON are the same data. But when JSON is signed or hashed, the exact bytes matter, and that is where canonical JSON comes in: a deterministic way to serialize the same data to exactly the same string every time.
阅读Relative URLs and How They Resolve
A relative URL leaves out the scheme and host and is completed against a base URL. The rules for how a browser fills in the rest, and how ./ and ../ and a leading slash change the result, explain a lot of broken links and a few security surprises.
阅读Roman Numerals: How the System Actually Works
Seven symbols, no zero, and one subtraction rule that arrived a thousand years after Rome. Why IIII is on your watch and IV is in your textbook, what IL breaks, and why the classical system runs out of road at 3999.
阅读十六进制编码(Base16)详解
十六进制如何用两个字符表示每个字节,为什么它是打印原始字节的默认方式,以及它与 Base64 和 Base32 相比如何。
阅读Deceptive URLs: Reading Past the Tricks
URLs are a favorite tool for phishing because the real destination is easy to disguise. The userinfo trick, redirect parameters, and look-alike characters all make a hostile link look friendly. This shows the common disguises and the one reliable habit for finding the real host.
阅读Time Arithmetic and Time Zones: Exact Durations, Honest Meetings
Why 'plus one month' has no exact answer, what ISO 8601 durations actually promise, and how one UTC instant becomes four different wall clocks. The DST trap, the day-shift trap, and the case for planning meetings with a real date.
阅读百分号编码(URL 编码)详解
为什么 URL 把某些字符转义为 %XX,哪些字符可以安全地保持原样,以及百分号编码与 Base64 有何不同。
阅读Base16、Base32、Base64 与百分号编码的比较
对四种文本编码的并排审视:它们的字母表、体积开销、可读性,以及何时求助于每一种。
阅读How text diff works
A diff finds the smallest set of insertions and deletions that turns one text into another. Underneath is the longest common subsequence: the lines both versions share, in order, form the unchanged backbone, and everything else is an add or a remove.
阅读Reading a diff
How to read a line-by-line diff: unchanged, added, and removed lines, the plus and minus markers, both sides' line numbers, inline word highlighting, and what ignore-whitespace and ignore-case actually change. Plus the things a diff cannot tell you.
阅读Word and Character Level Diffs
A line diff marks a whole line as changed even when a single character moved. Word-level and character-level diffs highlight the exact part of the line that changed, which is far easier to read for prose, long lines, and small edits. This covers the difference and when each is the right lens.
阅读Three-Way Diffs and Merge Conflicts
A normal diff compares two versions and cannot tell which one changed. A three-way diff adds a common ancestor, which is what makes automatic merging possible and what produces the <<<<<<< ======= >>>>>>> conflict markers. This explains the third input and how to read and resolve a conflict.
阅读Minimal Edits: Why a Diff Can Look Wrong
A diff shows the smallest set of insertions and deletions that turns one text into the other. Because the smallest set is not unique and the algorithm has to choose, a diff can align lines in ways that look counterintuitive, blaming the wrong block or splitting a moved section. Knowing this makes odd diffs readable.
阅读Reading XML Structure
XML is a tree of elements built from a handful of parts: an optional declaration, elements with attributes, text, and a few special constructs. Once you can name each part and see how they nest, reading an unfamiliar document top to bottom becomes routine rather than a guessing game.
阅读XML Namespaces Explained
When two XML vocabularies use the same element name for different things, namespaces keep them apart by binding a prefix to a unique URI. The prefix is just a local shorthand; the URI is the real identity. Understanding that split resolves most namespace confusion.
阅读Well-Formed vs Valid XML
Well-formedness is XML's baseline: one root, properly nested and matched tags, quoted attributes, and escaped specials. Validity is a stronger, separate claim that a document also follows a schema. A parser rejects ill-formed XML outright, which is why these rules come first.
阅读CDATA, Comments, and Processing Instructions
Not everything in XML is an element. CDATA sections hold raw text that would otherwise need escaping, comments annotate without affecting content, and processing instructions carry directions for an application. Recognizing these three keeps them from looking like mysterious noise.
阅读HTML Forms and Request Encoding: How the Web Ships Your Input
A form is a contract between a page and a server: which fields, which verb, which wire format. GET puts the answers in the URL; POST puts them in the body; and enctype picks the body's dialect - urlencoded's key=value chains, multipart's boundary-delimited parts built for files. What each choice means for logs, caches, size limits, and debugging, plus the fetch-era footnote: FormData kept the formats alive after forms stopped being the only sender.
阅读URI, URL, URN: What's Actually the Difference?
The three acronyms everyone uses interchangeably encode one clean idea: identify vs locate vs name. URI is the umbrella - any identifier in the standard grammar; URL is the identifier that also tells you where and how to fetch; URN was the scheme for pure, location-free names (urn:isbn:...). Why the W3C itself declared the classical trichotomy obsolete, what 'URI' means in specs vs 'URL' in conversation, and the naming lesson this site keeps collecting.
阅读