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 FiddleConvert 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 FiddleConvert 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 FiddleGenerate 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 FiddleConvert tabs to spaces
Replaces the tab characters in a text document with a configurable number of spaces.
Open FiddleFormat JSON document
Formats JSON code by adding newline characters and indenting blocks.
Open FiddlePerform DNS lookup
Queries a public DNS server to fetch records (A, AAAA, NS, CNAME, MX, etc.) for a given domain name.
Open FiddleConvert domain names to Punycode
Converts a list of internationalized domain names (IDNs) to their Punycode equivalents.
Open FiddleSort 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 FiddleGenerate SHA256 hash
Computes the SHA256 hash for an input text and returns it as a sequence of 64 hexadecimal digits.
Open FiddleCompress HTML
Minifies HTML code by removing unnecessary whitespace characters and comments.
Open FiddleCompress JavaScript
Minifies JavaScript code by removing unnecessary whitespace and replacing variable names.
Open FiddleGenerate URL slug
Converts a title into a dash-separated slug that can be used as part of a URL.
Open FiddleRemove 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 FiddleRandomly select items from a list
Picks a configurable number of random items from a list.
Open Fiddle