CodeToolWorks Tools

38 free tools — all calculations run locally in your browser

Colors

The Colors group is. Color stops being a name. Becomes a set of decisions: the same color in a different format, a family of colors that sit well together, a lighter or darker variant. The question that decides whether people can read your text at all, contrast. Four tools cover the four jobs. All four work on the color you bring, in your browser, with the results ready to copy into a stylesheet.

The Color Converter moves a color between HEX, RGB, HSL, and the other forms tools ask for. The Color Palette Generator builds a set of matching colors from one starting color, for when a design needs a family rather than a single swatch. The RGBA to HEX Converter handles the awkward case: a color picked with transparency, an alpha value, that must be written as an eight-digit HEX code. The Contrast Checker takes a text color and a background color and reports the contrast ratio between them, the number accessibility rules are written in.

Contrast is where the worked example matters, because the pass line is exact. Normal text needs a ratio of at least 4.5 to 1 against its background to meet the WCAG AA standard. The gray #777777 on white scores 4.48 to 1. It fails, by a hair. Darken it one step to #767676 and the score is 4.54 to 1. It passes. White on black is 21 to 1, the maximum. One digit in one channel is the whole difference between readable and not, which is why you check it here instead of eyeballing it.

Design

Design work has one tool in this group, and it is the one designers and front-end developers reach for first: the Color Picker. Pick any color on screen and it gives you the same color written the ways code needs it: HEX for stylesheets, RGB for canvas and many design tools, and HSL when you want to reason about a color by its hue, its saturation, and its lightness instead of by its ingredients.

The picker supports typing a color in as well as choosing one. Enter a HEX code with or without the # sign, in the short three-digit form or the full six-digit form, and every other format updates at once, with a live preview swatch so you can see the color you are describing. One-click copy puts the value you need on your clipboard without a transcription error, which is the whole point: a single wrong digit in a HEX code is a different color, and it will not announce itself.

A worked example using this site's own gold shows the three views of one color. The HEX value #d4af37 is RGB 212, 175, 55. In HSL it is hue 46 degrees, 65 percent saturation, 52 percent lightness. Same color, three descriptions. Use HEX when you paste into CSS, RGB when a tool asks for channels, and HSL when you need a lighter or darker version of the same hue: keep the first two numbers and move only the lightness.

DevOps

DevOps work runs on clocks. Schedules. Both are easy to get wrong in ways that stay silent for weeks. A log line stamped with a number like 1700000000 means nothing until you convert it. A cron line with one field off can run a job every minute instead of every month. The two tools in this group exist to make both plain before they cost you: one turns timestamps into dates you can read, the other turns cron expressions into schedules you can check.

The Timestamp Converter moves both ways between Unix timestamps, human-readable dates, and ISO 8601 text, across time zones, with a live clock showing the current epoch second. The Cron Expression Generator builds a five-field POSIX cron expression from plain choices, explains a schedule you paste in, and shows when it will run. If you work with servers, backups, or scheduled jobs of any kind, these two cover most of the time math you will meet.

One example shows why the converter earns its keep. The timestamp 1700000000 is November 14, 2023, at 22:13:20 UTC. Read the same digits as milliseconds and you land in the year 55941. That mix-up, seconds against milliseconds, is the most common timestamp bug there is. The second example is the calendar's edge: the largest 32-bit timestamp, 2147483647, is January 19, 2038, at 03:14:07 UTC, which is why old systems need care past that date. Check the digits here, before the deploy.

Encoders

The Encoders group holds the second shelf of data translations: the ones you meet inside web pages, emails, and text files rather than inside URLs. HTML entities make characters safe inside markup. Hex writes bytes as pairs of digits. ROT13 scrambles letters for spoilers and puzzles. Two converters round out the group: one turns an image into a Base64 string you can embed, and one takes a URL apart into its pieces so you can inspect each one.

The HTML Entity Encoder and Decoder swaps characters like < and & for their entity forms, and back. The Hex to Text Converter translates between plain text and hexadecimal, the form in which dumps, debuggers, and low-level tools present bytes. The ROT13 Cipher shifts every letter by thirteen places. Is its own undoing, since thirteen is half of twenty-six. The Image to Base64 Converter reads a picture file and returns the string form. The URL Parser splits an address into scheme, host, path, query, and fragment, and lists the query parameters one by one.

Two small examples anchor the group. The word Hello written in hex is 48656C6C6F: each letter becomes the two-digit hex value of its byte, so five letters become ten digits. And ROT13 turns Hello into Uryyb, and Uryyb back into Hello, with the same tool and the same setting. Neither is security. Hex and ROT13 hide nothing from anyone who recognizes them. They are ways of writing data, not ways of protecting it, and the tools here present them that way.

Encoding

Encoding is translation for data. Some characters can’t travel safely inside a URL, a header, or a query string. They get rewritten into a form that can. The two tools in this group handle the two translations developers meet most: Base64. Rewrites any bytes as plain text. URL encoding. Rewrites the unsafe characters inside a web address. Both tools work both ways—encode. Decode. Both run in your browser.

The Base64 Encoder and Decoder converts UTF-8 text to Base64 and back, with the URL-safe Base64URL alphabet from RFC 4648 when you need it. The URL Encoder and Decoder escapes and unescapes full URLs and single query values, which are not the same job: a full URL keeps its slashes and colons, while a single value must escape them. If a link breaks or a parameter arrives garbled, one of these two tools usually shows why. Keep both tools open when you debug an API call: decode the value you sent, decode the value that arrived, and the difference between them is usually the bug.

The Base64 rule is worth learning once, because it explains the size of everything it touches. Bytes are grouped three at a time, and each group of three bytes becomes four characters. The word Man becomes TWFu. A short leftover group gets padding: M becomes TQ== and Ma becomes TWE=. Four characters for every three bytes means the output is always about a third bigger than the input. The Base64 guide on this site works the full example, padding and all.

Formatters

Formatters take text that a machine wrote for other machines. Make it readable by a person. An API response, a config file, or a minified page arrives as one long line with no breaks. The formatter adds line breaks. Indentation in the right places, and, just as big, it checks the structure as it goes. If a bracket is missing or a tag is closed in the wrong order, the formatter is often the first tool to find it. Text that cannot be parsed cannot be formatted.

The group includes ten tools. The JSON Formatter formats, validates, and minifies JSON. The JSON Minifier shrinks it alone and reports the bytes saved. The XML, HTML, CSS, SQL, and JavaScript formatters each pretty-print or minify their own language, following that language's rules. The YAML to JSON Converter checks YAML and turns it into JSON. The Strip HTML Tags tool goes the other way and removes markup, leaving plain text. Pick the tool named for the text in front of you. They share one habit: your text stays in your browser.

Formatting is not just about looks. Take one small record: a name, a role, a flag, a count, and a list of two tags. Written with two-space indentation it takes 120 bytes. Minified, the same record takes 86 bytes. The 34 bytes saved are about 28 percent, and on a large file the saving grows with it. Read the pretty version when you debug. Ship the minified version when you deploy. The two tools above do each job, and the JSON guide on this site explains the rules both of them follow.

Generators

Generators make the values you should never invent by hand. An ID typed from your head will collide or repeat. A password you make up follows habits an attacker can guess. Placeholder text and test data take time to fake one record at a time. The five tools in this group produce these things properly: unique IDs, random strings, filler text, structured sample data, and a ready-made ignore file for your project.

The UUID Generator creates version 4 UUIDs, the random kind used for database keys. Request IDs. The Random String Generator builds strings at your length from the character sets you allow. The Lorem Ipsum Generator produces filler text by the paragraph, sentence, or word, for layouts that need words before the real words exist. The Mock JSON Generator builds sample JSON records. You can test an interface against data shaped like the real thing. The .gitignore Generator assembles the ignore file for your stack. Build output. Local files stay out of your repository.

The UUID numbers show why generated beats invented. A version 4 UUID carries 122 random bits, which is about 5.3 times ten to the thirty-sixth possible values. You could generate a billion of them and the chance that any two match is still effectively zero, which is why systems hand them out without checking a central list first. Compare that with counting upward from one, which any observer can predict. When a value must be unique, or must be unguessable, generate it here instead of making it up.

References

References are the pages you do not read once. Look up forever: the code a server answered with, the type a file declares itself to be, the encoding a text file was saved in. When something breaks, these three tables are. The answer usually sits. This group keeps them on one site, searchable. Complete, instead of scattered across the notes you half remember. Keep them bookmarked; you will be back.

The HTTP Status Codes reference lists the response codes servers return. Grouped by their first digit: info, success, redirection, client errors. Server errors. The MIME Type Reference pairs file kinds. With the type names servers. Browsers use for them, the label. That decides how a download or an upload is handled. The Charset. Encoding Reference explains the character encodings text travels in, UTF-8 above all. Why the wrong one turns apostrophes into garbage.

Three lookups handle most bad days. A 404 means the server is fine and the address is wrong. A 500 means the address was fine and the server broke. A 301 means the page moved for good and your link should be updated. A file served with the wrong MIME type can be downloaded when it should display, or blocked when it should run. Text that shows a diamond or a box where a letter belongs is almost always a file saved in one encoding and read in another. When you meet any of these, start here.

Security

Security tools handle three jobs. A small mistake costs a lot: picking a password, checking a fingerprint of some data. Reading the token your app uses to prove who is signed in. All three run on the Web Crypto API built into your browser. The secrets you type never leave your device. That matters here more than anywhere else on this site. A password or a token should never be pasted into a tool that sends it to a stranger's server.

The Password Generator builds random passwords at the length and character mix you pick. The Hash Generator computes SHA-256, SHA-512, SHA-384, and SHA-1 hashes, so you can check a file or a string against a known checksum. The JWT Decoder splits a JSON Web Token into its header, payload, and signature, and shows the first two as readable JSON. Decoding a token is not verifying it. Anyone can decode one. Only your server, with its secret or key, can check the signature.

Strength is length, measured in bits of entropy. A random 12-character password drawn from all 94 printable characters carries about 78.7 bits. At ten billion guesses a second, an attacker working on a stolen hash would need about a week just to try every 8-character password. About 1.5 million years to try every 12-character one. The guide on this site about strong passwords shows the full math. Run the numbers here before you set a policy or reuse a short password one more time.

Text Tools

Text tools work on the words. Markup themselves: finding the pieces of a string that match a pattern, turning a title into a clean link. Shrinking a vector graphic. It loads faster. These are the jobs that sit between writing content. Shipping it. Each one is fiddly enough by hand that a small error slips through. Three tools cover them, all in your browser. All three reward a minute of checking here over an hour of debugging later.

The Regex Tester runs a regular expression against your text. Shows what matches. You can build a pattern step by step instead of testing it against production data. The Slug Generator turns a headline or a product name into the lowercase, hyphenated form that URLs use, removing the characters that do not belong there. The SVG Optimizer takes an SVG file. Design tools often export with editor data, comments. Needless precision. Returns a smaller file that draws the same picture.

A slug shows the rules in one line. Take the title How to Format JSON Without Errors. The slug form is how-to-format-json-without-errors: lowercase, spaces become hyphens, punctuation goes away. Do that by hand across a whole site and one missed capital or stray character gives you two addresses for one page. A regex has the same character: a pattern written to find dates will also find any three groups of digits unless you test it against text that should not match. Test both here, where a mistake costs nothing.