Templates

Sample projects created with TxtFiddle.

Convert date/time to different format

Uses the "Luxon" library to parse a custom date/time string and convert it to ISO 8601 format.

Open Fiddle
Convert hex color value to RGB

Converts a color value in hexadecimal format (e.g. #3498db) to its RGB representation (e.g. rgb(52, 152, 219)).

Open Fiddle
Convert RGB color value to hex

Converts a color value in RGB notation (e.g. rgb(52, 152, 219)) to hexadecimal notation (e.g. #3498db).

Open Fiddle
Generate SQL INSERT INTO statement from CSV

Shows how to read values from a CSV file and convert them into an SQL INSERT INTO statement.

Open Fiddle
Convert tabs to spaces

Replaces the tab characters in a text document with a configurable number of spaces.

Open Fiddle
Add line numbers to text

Prepends a line number to each line of a text.

Open Fiddle
Extract URLs from text

Uses a regular expression to find URLs/links in a text document.

Open Fiddle
Format JSON document

Formats JSON code by adding newline characters and indenting blocks.

Open Fiddle
Perform DNS lookup

Queries a public DNS server to fetch records (A, AAAA, NS, CNAME, MX, etc.) for a given domain name.

Open Fiddle
Convert domain names to Punycode

Converts a list of internationalized domain names (IDNs) to their Punycode equivalents.

Open Fiddle
Sort lines naturally

Sorts the lines of a text by natural ordering the way a human would do it. This means that a string "2" is ordered before "10," whereas a normal string comparison would yield the opposite.

Open Fiddle
Generate SHA256 hash

Computes the SHA256 hash for an input text and returns it as a sequence of 64 hexadecimal digits.

Open Fiddle
Reverse line order

Flips the order of the lines in a text document.

Open Fiddle
Compress HTML

Minifies HTML code by removing unnecessary whitespace characters and comments.

Open Fiddle
Compress JavaScript

Minifies JavaScript code by removing unnecessary whitespace and replacing variable names.

Open Fiddle
Format JavaScript code

Parses JavaScript code and re-prints it for better readability.

Open Fiddle
Generate URL slug

Converts a title into a dash-separated slug that can be used as part of a URL.

Open Fiddle
Extract domains from URLs

Parses domain names/hostnames from a list of URLs.

Open Fiddle
Remove subdomain from domain

Demonstrates how to extract the second and top level domain (e.g. "example.co.uk") from a full domain (e.g. "www.example.co.uk") using data from the "Public Suffix List".

Open Fiddle
Randomly select items from a list

Picks a configurable number of random items from a list.

Open Fiddle