# Peasy Text — Full Catalog > Text tools made easy. Peasy Text provides free browser-based tools at https://peasytext.com/. All processing happens client-side — files never leave your device. ## Tools (15) ### Word Counter Count words, characters, sentences, and paragraphs. Instantly count words, characters, sentences, paragraphs, and lines in any text. Also estimates reading time based on average reading speed. - URL: https://peasytext.com/text/text-counter/ - Category: Text Tools - Processing: client - Steps: 1. Paste or type your text in the input area 2. Statistics update automatically as you type 3. View word count, character count, sentences, paragraphs, lines, and reading time ### Case Converter Convert text between UPPER, lower, Title, camelCase, and more. Convert text between 8 different case formats: UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case, and kebab-case. - URL: https://peasytext.com/text/text-case-converter/ - Category: Text Tools - Processing: client - Steps: 1. Paste or type your text 2. Select the target case from the dropdown 3. Click Convert to transform the text 4. Copy the result ### Sort Lines Sort lines alphabetically, numerically, or randomly. Sort lines of text in alphabetical, reverse, numeric, random, or length order. Optionally remove blank lines and control case sensitivity. - URL: https://peasytext.com/text/sort-lines/ - Category: Text Tools - Processing: client - Steps: 1. Paste your list of lines 2. Choose the sort order (A→Z, Z→A, numeric, random, or by length) 3. Optionally enable case sensitivity or remove blank lines 4. Click Sort to reorder ### Lorem Ipsum Generator Generate placeholder text for designs and layouts. Generate Lorem Ipsum placeholder text in paragraphs, sentences, or words. Customize the amount and choose whether to start with the classic 'Lorem ipsum dolor sit amet' opening. - URL: https://peasytext.com/text/lorem-ipsum-generator/ - Category: Text Tools - Processing: client - Steps: 1. Set the number of paragraphs, sentences, or words to generate 2. Choose the unit type 3. Optionally start with 'Lorem ipsum dolor sit amet...' 4. Click Generate ### Slug Generator Convert text to URL-friendly slugs. Convert any text into a clean, URL-friendly slug. Removes special characters, replaces spaces with hyphens or underscores, and optionally truncates to a maximum length. - URL: https://peasytext.com/text/slug-generator/ - Category: Text Tools - Processing: client - Steps: 1. Type or paste the text to slugify 2. Choose separator (hyphen, underscore, or dot) 3. Set a maximum length if needed (0 = no limit) 4. Click Slugify ### Find & Replace Find and replace text with regex support. Find and replace text with support for regular expressions, case sensitivity, and replace-all mode. Preview changes before copying the result. - URL: https://peasytext.com/text/find-and-replace/ - Category: Text Tools - Processing: client - Steps: 1. Paste your text 2. Enter the text to find and the replacement text 3. Enable regex, case sensitivity, or replace-all as needed 4. Click Replace to see the result ### Remove Duplicate Lines Remove duplicate lines from text. Remove duplicate lines from a list while preserving the original order. Configure case sensitivity, whitespace trimming, and blank line removal. - URL: https://peasytext.com/text/remove-duplicate-lines/ - Category: Text Tools - Processing: client - Steps: 1. Paste your list with duplicate lines 2. Choose comparison options (case sensitivity, trimming) 3. Click Remove Duplicates 4. Copy the deduplicated result ### Base64 Encoder/Decoder Encode text to Base64 or decode Base64 back to text. Encode plain text to Base64 or decode Base64 strings back to readable text. Supports Unicode characters through UTF-8 encoding. - URL: https://peasytext.com/text/base64-encode-decode/ - Category: Text Tools - Processing: client - Steps: 1. Choose Encode or Decode 2. Paste your text (or Base64 string for decoding) 3. Click Encode / Decode 4. Copy the result ### URL Encoder/Decoder Encode or decode URL-encoded strings. Encode special characters for safe use in URLs, or decode percent-encoded strings back to readable text. Supports both component encoding and full URI encoding. - URL: https://peasytext.com/text/url-encode-decode/ - Category: Text Tools - Processing: client - Steps: 1. Choose Encode or Decode 2. Select encoding mode (Component or Full URI) 3. Paste your text or URL 4. Click Process ### JSON Formatter Format or minify JSON data. Pretty-print JSON for readability or minify it for compact storage. Validates JSON syntax and reports errors with line numbers. - URL: https://peasytext.com/text/json-formatter/ - Category: Text Tools - Processing: client - Steps: 1. Paste your JSON data 2. Choose Format (pretty-print) or Minify (compact) 3. Adjust indent level for formatting (default: 2 spaces) 4. Click Format / Minify ### HTML Entity Encoder/Decoder Encode special characters as HTML entities or decode them. Encode special characters like <, >, &, and quotes into their HTML entity equivalents, or decode HTML entities back to characters. - URL: https://peasytext.com/text/html-entity-encoder/ - Category: Text Tools - Processing: client - Steps: 1. Choose Encode or Decode 2. Paste your text or HTML 3. Click Convert 4. Copy the result ### Reverse Text Reverse characters, words, or lines in your text. Reverse text at the character, word, or line level. Character reversal handles Unicode correctly, including emoji and CJK characters. - URL: https://peasytext.com/text/reverse-text/ - Category: Text Tools - Processing: client - Steps: 1. Paste your text 2. Choose reversal mode: characters, words, or lines 3. Click Reverse ### Add/Remove Line Numbers Add or remove line numbers from text. Add line numbers to text with customizable separator and start number, or remove existing line numbers from numbered text. - URL: https://peasytext.com/text/line-numbers/ - Category: Text Tools - Processing: client - Steps: 1. Paste your text 2. Choose Add or Remove 3. For adding: set separator, start number, and padding preference 4. Click Process ### Text Diff Compare two texts and highlight differences. Compare two blocks of text side by side and see the differences highlighted. Compare by line or by word, with options to ignore case and whitespace. - URL: https://peasytext.com/text/text-diff/ - Category: Text Tools - Processing: client - Steps: 1. Paste the original text in the first input 2. Paste the modified text in the second input 3. Choose line or word comparison mode 4. Optionally ignore case or whitespace 5. Click Compare ### Text Extractor Extract emails, URLs, numbers, or IPs from text. Extract specific data from text using built-in patterns: email addresses, URLs, numbers, IP addresses, and hashtags. Filter for unique values and optionally sort the results. - URL: https://peasytext.com/text/text-extractor/ - Category: Text Tools - Processing: client - Steps: 1. Paste text containing the data you want to extract 2. Select what to extract (emails, URLs, numbers, IPs, or hashtags) 3. Enable Unique to remove duplicates 4. Enable Sort to alphabetize results 5. Click Extract ## Guides (75) ### Text Encoding Explained: UTF-8, ASCII, and Beyond Text encoding determines how characters are stored as bytes. Understanding UTF-8, ASCII, and other encodings prevents garbled text, mojibake, and data corruption in your applications and documents. - URL: https://peasytext.com/guides/text-encoding-utf8-ascii/ - Category: How-To - Reading time: 1 min - Words: 245 Key takeaways: - Computers store everything as numbers. - ASCII (American Standard Code for Information Interchange) maps 128 characters to numbers 0-127. - UTF-8 is the dominant encoding on the web (used by 98%+ of websites). - When text encoded in one system is decoded in another, you get mojibake — garbled characters like `é` instead of `e` or `???` instead of Chinese characters. - Unless you have a specific reason to use another encoding, always choose UTF-8. ## What Is Text Encoding? Computers store everything as numbers. Text encoding is the mapping between characters (letters, symbols, emoji) and the numbers that represent them. When sender and receiver use different encodings, text appears garbled. ## ASCII: The Foundation ASCII (American Standard Code for Information Interchange) maps 128 characters to numbers 0-127. It covers the English alphabet, digits, punctuation, and control characters. ASCII is a subset of virtually every modern encoding. ## UTF-8: The Universal Standard UTF-8 is the dominant encoding on the web (used by 98%+ of websites). It can represent every character in the Unicode standard — over 149,000 characters from all writing systems. **Key properties of UTF-8:** - ASCII-compatible: The first 128 characters use identical byte values. - Variable-width: Characters use 1-4 bytes depending on their code point. - Self-synchronizing: You can find character boundaries from any position. ## Common Encoding Issues ### Mojibake When text encoded in one system is decoded in another, you get mojibake — garbled characters like `é` instead of `e` or `???` instead of Chinese characters. ### BOM (Byte Order Mark) Some editors add a BOM (`EF BB BF`) at the start of UTF-8 files. While harmless in most contexts, it can cause issues in scripts, CSV files, and configuration files. ## Best Practice: Always Use UTF-8 Unless you have a specific reason to use another encoding, always choose UTF-8. It supports every language, is backward-compatible with ASCII, and is the expected default on modern systems. ### How to Optimize Images for SEO Optimize images for search engine visibility and faster page loads. Learn about alt text, file naming, compression, responsive images, lazy loading, and structured data for image SEO. - URL: https://peasytext.com/guides/how-to-optimize-images-for-seo/ - Category: How-To - Reading time: 1 min - Words: 192 ## Image SEO Fundamentals Images appear in Google Image Search, generate traffic, and affect page ranking through Core Web Vitals. Properly optimized images load fast, are discoverable by search engines, and provide context to crawlers. ## Key Optimization Factors ### File Names Use descriptive, keyword-rich file names separated by hyphens: `blue-mountain-sunrise.jpg` instead of `IMG_4532.jpg`. Search engines use file names as ranking signals. ### Alt Text Write descriptive alt attributes that explain the image content. Alt text serves screen readers and helps search engines understand the image. Keep it under 125 characters. ### File Size & Format Use WebP or AVIF for the best compression-to-quality ratio. Aim for images under 200KB for standard content images and under 100KB for thumbnails. ### Responsive Images Use `srcset` and `sizes` attributes to serve appropriately sized images for each device width. This prevents mobile devices from downloading desktop-sized images. ## Quick Checklist 1. Descriptive file name with target keywords 2. Alt text describing image content (not stuffed with keywords) 3. Compressed to under 200KB using WebP or optimized JPEG 4. Correct dimensions (do not rely on CSS to resize) 5. Lazy loading with `loading="lazy"` for below-fold images ### LinkedIn Post Formatting: Maximizing Professional Engagement LinkedIn's feed algorithm heavily favors native text posts with specific formatting patterns. Understanding how LinkedIn renders content and what drives professional engagement can significantly increase post visibility. - URL: https://peasytext.com/guides/linkedin-post-formatting-guide/ - Category: How-To - Reading time: 2 min - Words: 332 Key takeaways: - LinkedIn classifies content into three quality buckets: spam, low-quality, and high-quality. - LinkedIn truncates posts after approximately 210 characters with a 'see more' link. - The professional audience peaks Tuesday through Thursday, 7-8 AM and 12-1 PM in the target timezone. ## How the LinkedIn Feed Works LinkedIn classifies content into three quality buckets: spam, low-quality, and high-quality. High-quality posts enter a testing phase where they are shown to a subset of your connections. If engagement (reactions, comments, reposts) exceeds average performance for your account, distribution expands to second and third-degree connections. ## The Anatomy of a High-Performing Post ### The Hook (First 2 Lines) LinkedIn truncates posts after approximately 210 characters with a 'see more' link. The click-through rate on this link is a strong ranking signal. Write the first two lines as a standalone hook that creates urgency to expand. Avoid generic openings like 'I'm excited to announce' — instead lead with a specific insight, statistic, or contrarian observation. ### Body Structure LinkedIn renders line breaks literally, making whitespace a formatting tool. Use single-sentence paragraphs separated by blank lines for readability on mobile. Bullet points work but numbered lists perform slightly better because they imply a sequence worth completing. ### The Close End with a specific call-to-action that invites comments. 'What do you think?' is too vague. Instead, pose a binary choice ('Do you agree that X or Y?') or ask for a personal experience ('What's the hardest lesson you learned in your first management role?'). Comments are weighted 4-5x heavier than reactions in the algorithm. ## Content Types by Performance | Format | Avg. Reach | Best For | |--------|-----------|----------| | Text-only | High | Personal stories, insights | | Text + single image | Medium-High | Data, infographics | | Carousel (PDF) | High | Step-by-step guides | | Video | Medium | Demonstrations, interviews | | External link | Low | Sharing articles (algorithm deprioritizes) | | Poll | High (but shallow) | Quick engagement, less meaningful | ## Timing and Frequency The professional audience peaks … ### Document Format Interoperability: PDF, DOCX, ODT, and Markdown Navigate the complexities of converting between document formats. Understand what survives conversion, what gets lost, and best practices for maintaining fidelity across PDF, DOCX, ODT, and Markdown. - URL: https://peasytext.com/guides/document-format-interoperability-guide/ - Category: Comparison - Reading time: 1 min - Words: 290 Key takeaways: - Every document format makes different assumptions about content structure. - Text content survives most conversions. - PDF → anything**: Column layouts, text flow, headers/footers break - Write in the most structured format possible and convert to presentation formats at the end. ## The Interoperability Challenge Every document format makes different assumptions about content structure. PDF preserves exact visual layout but loses semantic structure. DOCX encodes rich formatting in XML but ties you to Microsoft's ecosystem. Markdown captures structure cleanly but cannot express complex layouts. Understanding these tradeoffs helps you choose source and target formats wisely. ## Format Characteristics | Feature | PDF | DOCX | ODT | Markdown | | --- | --- | --- | --- | --- | | Layout fidelity | Exact | High | High | None | | Semantic structure | Low | High | High | Very high | | Editability | Low | High | High | Very high | | File size | Medium | Medium | Medium | Very small | | Version control | Poor | Poor | Poor | Excellent | | Accessibility | Variable | Good | Good | Excellent | ## What Survives Conversion Text content survives most conversions. Headings, lists, and basic formatting (bold, italic) transfer reliably between DOCX, ODT, and Markdown. Tables work across DOCX and ODT but simplify when converting to Markdown. Images embed correctly in most directions but may lose resolution or positioning. ## What Gets Lost - **PDF → anything**: Column layouts, text flow, headers/footers break - **DOCX → Markdown**: Track changes, comments, footnotes, complex tables - **Markdown → PDF**: Custom page sizes, page numbers, print-specific layout - **Any → PDF**: Editability (PDF is effectively a snapshot) ## Best Practices Write in the most structured format possible and convert to presentation formats at the end. Markdown to PDF is far more reliable than PDF to Markdown. Convert documents with Peasy's client-side format converters for instant results without uploading sensitive content to any server. ### Regex Cheat Sheet: Essential Patterns for Text Processing A practical regular expression reference covering the most commonly needed patterns for text processing. Includes email validation, URL matching, date parsing, and number formatting patterns with explanations. - URL: https://peasytext.com/guides/regex-cheat-sheet-essential-patterns/ - Category: How-To - Reading time: 1 min - Words: 243 Key takeaways: - Regular expressions describe text patterns using a concise syntax. - `*?`, `+?` — Non-greedy versions - Catastrophic backtracking: Patterns like `(a+)+b` can take exponential time on inputs like `aaaaaaaaaaac`. - ## Essential Patterns | Pattern | Matches | Example | | --- | --- | --- | | `\d{1,3}\. ## Regex Basics Regular expressions describe text patterns using a concise syntax. They power search-and-replace in editors, input validation in forms, and text extraction in data pipelines. Mastering a handful of core patterns covers 90% of real-world regex needs. ## Essential Patterns | Pattern | Matches | Example | | --- | --- | --- | | `\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}` | IPv4 address (loose) | `192.168.1.1` | | `[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}` | Email (simple) | `user@example.com` | | `https?://[^\s]+` | URL (simple) | `https://example.com/page` | | `\d{4}-\d{2}-\d{2}` | ISO date | `2026-03-10` | | `#[0-9a-fA-F]{3,8}` | Hex color | `#FF6B35` | | `\b\w+\b` | Word boundary | Individual words | ## Quantifiers and Groups - `*` — Zero or more (greedy) - `+` — One or more (greedy) - `?` — Zero or one (optional) - `*?`, `+?` — Non-greedy versions - `{n,m}` — Between n and m repetitions - `(abc)` — Capture group - `(?:abc)` — Non-capturing group - `(?=abc)` — Lookahead (matches position before abc) - `(?<=abc)` — Lookbehind (matches position after abc) ## Common Mistakes **Catastrophic backtracking**: Patterns like `(a+)+b` can take exponential time on inputs like `aaaaaaaaaaac`. Avoid nested quantifiers on the same characters. **Greedy matching**: `<.*>` matches from the first `<` to the last `>` on a line, not individual tags. Use `<.*?>` (non-greedy) or `<[^>]*>` (character class). Test and refine your regex patterns with the Peasy regex tester — real-time matching with step-by-step explanation of how the engine processes each pattern. ### Text Encoding Explained: UTF-8, ASCII, Latin-1, and Unicode Demystify character encoding — why text appears as garbled symbols, how UTF-8 became the universal standard, and practical strategies for handling encoding issues in your workflow. - URL: https://peasytext.com/guides/text-encoding-utf8-ascii-unicode-explained/ - Category: How-To - Reading time: 1 min - Words: 261 Key takeaways: - Every text file is a sequence of bytes. - UTF-8 uses variable-length encoding: ASCII characters (U+0000 to U+007F) use one byte, identical to ASCII. - Double encoding**: UTF-8 bytes interpreted as Latin-1, then re-encoded to UTF-8 → `café` (two bytes for é become four) - Use UTF-8 everywhere — source files, databases, APIs, and file storage. ## Why Encoding Matters Every text file is a sequence of bytes. Character encoding defines the mapping between bytes and characters. When the wrong encoding is assumed, text appears as garbled symbols (mojibake) — `café` becomes `café` when UTF-8 is decoded as Latin-1. Understanding encoding prevents data corruption. ## The Encoding Timeline | Era | Encoding | Characters | Bytes/Char | | --- | --- | --- | --- | | 1960s | ASCII | 128 | 1 | | 1980s | Latin-1 (ISO 8859-1) | 256 | 1 | | 1990s | Windows-1252 | 256 (extended) | 1 | | 2000s | UTF-8 | 1,114,112 (all Unicode) | 1-4 | | Current | UTF-8 dominates (>98% of web) | — | — | ## How UTF-8 Works UTF-8 uses variable-length encoding: ASCII characters (U+0000 to U+007F) use one byte, identical to ASCII. Latin characters use two bytes. CJK characters and emoji use three to four bytes. This backward compatibility with ASCII is why UTF-8 won — existing ASCII text is valid UTF-8 without modification. ## Common Encoding Problems - **Double encoding**: UTF-8 bytes interpreted as Latin-1, then re-encoded to UTF-8 → `café` (two bytes for é become four) - **BOM insertion**: Some tools prepend a Byte Order Mark (EF BB BF) that other tools do not expect - **Database charset mismatch**: Connection charset differs from table charset ## Best Practice Use UTF-8 everywhere — source files, databases, APIs, and file storage. Specify encoding explicitly (`charset=utf-8`) rather than relying on platform defaults. Detect and convert encodings with the Peasy encoding tools. ### Advanced Markdown: Tables, Footnotes, Task Lists, and Extensions Go beyond basic Markdown with advanced features supported by major platforms. Covers GFM tables, footnotes, task lists, math notation, Mermaid diagrams, and the differences between Markdown flavors. - URL: https://peasytext.com/guides/advanced-markdown-tables-footnotes-extensions/ - Category: How-To - Reading time: 1 min - Words: 223 Key takeaways: - Basic Markdown covers headings, bold, italic, links, and images. - GFM (GitHub Flavored Markdown) tables use pipes and dashes. - Supported by GFM, Obsidian, and most static site generators: - Interactive checkboxes render on GitHub and GitLab: - GitHub, GitLab, Notion, and Obsidian render Mermaid diagrams directly in Markdown. ## Beyond Basic Markdown Basic Markdown covers headings, bold, italic, links, and images. But modern Markdown platforms support rich features that many users never discover. These extensions can replace dedicated diagramming tools, project trackers, and math editors for many common tasks. ## Tables GFM (GitHub Flavored Markdown) tables use pipes and dashes. Column alignment is controlled by colons in the separator row: left (`:---`), center (`:---:`), right (`---:`). Cells cannot span multiple rows or columns — for complex tables, use HTML within Markdown. ## Footnotes Supported by GFM, Obsidian, and most static site generators: ``` This claim needs citation[^1]. [^1]: Source: Nature, 2024, Vol 615. ``` ## Task Lists Interactive checkboxes render on GitHub and GitLab: ``` - [x] Completed item - [ ] Pending item - [ ] Another pending item ``` ## Mermaid Diagrams GitHub, GitLab, Notion, and Obsidian render Mermaid diagrams directly in Markdown. Create flowcharts, sequence diagrams, Gantt charts, and entity-relationship diagrams without external tools. ## Math Notation LaTeX math expressions render on GitHub, GitLab, and Jupyter. Inline math uses `$E = mc^2$`, display math uses `$$` delimiters. This enables technical documentation with proper mathematical notation. ## Flavor Differences CommonMark is the standardization effort, but GitHub, GitLab, Obsidian, and Pandoc each extend it differently. Always check your target platform's documentation. Format and preview Markdown with the Peasy Markdown editor. ### Lorem Ipsum and Placeholder Text: When and How to Use It Placeholder text fills layouts during design before real content arrives. This guide covers the history of Lorem Ipsum, when to use it, and better alternatives for different contexts. - URL: https://peasytext.com/guides/lorem-ipsum-placeholder-text-guide/ - Category: How-To - Reading time: 1 min - Words: 295 Key takeaways: - Lorem Ipsum is scrambled Latin derived from Cicero's 'De Finibus Bonorum et Malorum' (45 BC). - For a medical site, use placeholder text about health topics. - Paragraph count**: Generate 1-50 paragraphs - Many designers now advocate for content-first design, where real content shapes the design rather than the other way around. ## What Is Lorem Ipsum Lorem Ipsum is scrambled Latin derived from Cicero's 'De Finibus Bonorum et Malorum' (45 BC). It has been the printing industry's standard placeholder text since the 1500s. Its letter distribution roughly mimics English, making layouts look realistic. ## When to Use Placeholder Text | Scenario | Use Placeholder? | Why | |----------|-----------------|-----| | Wireframing | Yes | Focus on structure, not content | | Client presentations | Sometimes | Real content is better if available | | Development testing | Yes | Need text to test layouts | | Production deployment | Never | Replace before launch | ## Alternatives to Lorem Ipsum ### Topic-Relevant Placeholder For a medical site, use placeholder text about health topics. For a legal site, use legal-sounding text. This helps stakeholders visualize the final product more accurately. ### Real Draft Content The best placeholder is actual draft content. Even rough drafts reveal layout issues that Lorem Ipsum hides — overly long titles, insufficient paragraph variety, and missing images. ### Different Languages If your site supports multiple languages, test layouts with text in each target language. German words are 30% longer than English on average; Chinese characters are much more compact. These differences affect layouts significantly. ## Generator Features to Look For - **Paragraph count**: Generate 1-50 paragraphs - **Word count**: Fixed or variable-length output - **HTML output**: Wrapped in `<p>` tags for direct paste into HTML - **Lists and headings**: Generate structured content, not just paragraphs - **Character set**: Support for different scripts and languages ## The 'Content-First' Movement Many designers now advocate for content-first design, where real content shapes the design rather than the other way around. When real content is available early in the process, layouts naturally accommodate actual content lengths and structures. ### Creating Fillable PDF Forms: A Step-by-Step Guide Fillable PDF forms replace printed forms that must be filled out by hand. Properly designed PDF forms include text fields, checkboxes, dropdowns, and validation rules that guide users and ensure data consistency. - URL: https://peasytext.com/guides/creating-fillable-pdf-forms-guide/ - Category: How-To - Reading time: 2 min - Words: 381 Key takeaways: - Despite the rise of web forms, PDF forms remain essential in industries that require offline access, legal signatures, and standardized document formats. - Text fields are the most common form element. - Set the tab order to follow the visual layout — top to bottom, left to right. - PDF forms support JavaScript-based validation and calculation. - ## Why PDF Forms Still Matter Despite the rise of web forms, PDF forms remain essential in industries that require offline access, legal signatures, and standardized document formats. ## Why PDF Forms Still Matter Despite the rise of web forms, PDF forms remain essential in industries that require offline access, legal signatures, and standardized document formats. Government applications, insurance claims, tax forms, and medical intake documents all rely heavily on PDF forms. ## Form Field Types ### Text Fields Text fields are the most common form element. Configure them with: - **Max length** — Prevent overly long entries (e.g., 10 characters for phone numbers) - **Format** — Number, date, percentage, or custom format mask - **Default value** — Pre-fill with common answers to speed completion - **Multi-line** — Enable for address fields and comments - **Required** — Mark mandatory fields to prevent incomplete submissions ### Checkboxes and Radio Buttons Use checkboxes for multiple-selection questions (select all that apply) and radio buttons for single-selection questions (choose one). Group related radio buttons so selecting one automatically deselects others in the group. ### Dropdown Lists Dropdowns work well for fields with a predefined set of options (country, state, department). They prevent typos and ensure consistent data. For lists with more than 20 items, consider adding a search/filter capability or splitting into cascading dropdowns. ### Signature Fields Digital signature fields allow users to sign the form electronically. Place signature fields clearly at the bottom of the form with a visible label. Signature fields can be configured to lock the form after signing, preventing further modifications. ## Layout Best Practices ### Tab Order Set the tab order to follow the visual layout — top to bottom, left to right. Users expect to press Tab and move to the next logical field. Poor tab order is the single most common complaint about PDF forms and makes them inaccessible to keyboard-only users. ### Field Sizing Size text fields to match expected input length. A field … ### Regular Expressions: A Practical Guide for Text Processing Regular expressions are powerful patterns for searching, matching, and transforming text. This guide covers the most useful regex patterns with real-world examples for common text processing tasks. - URL: https://peasytext.com/guides/regex-practical-guide/ - Category: How-To - Reading time: 1 min - Words: 167 Key takeaways: - Regular expressions let you describe complex text patterns in a concise syntax. - `\w` matches word characters (letters, digits, underscore) - A practical (not RFC-compliant) email pattern: - Greedy matching**: `.*` matches as much as possible. Use `.*?` for non-greedy. - ## Essential Patterns ### Character Classes - `\d` matches any digit (0-9) - `\w` matches word characters (letters, digits, underscore) - `\s` matches whitespace (space, tab, newline) - `. ## Why Learn Regex? Regular expressions let you describe complex text patterns in a concise syntax. They're supported in virtually every programming language, text editor, and command-line tool. ## Essential Patterns ### Character Classes - `\d` matches any digit (0-9) - `\w` matches word characters (letters, digits, underscore) - `\s` matches whitespace (space, tab, newline) - `.` matches any character except newline ### Quantifiers - `*` matches zero or more - `+` matches one or more - `?` matches zero or one - `{3}` matches exactly three - `{2,5}` matches two to five ## Practical Examples ### Email Validation A practical (not RFC-compliant) email pattern: `[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}` ### Phone Numbers Match various phone number formats: `\+?\d{1,3}[-.\s]?\(?(\d{1,4})\)?[-.\s]?\d{1,4}[-.\s]?\d{1,9}` ### URL Extraction Find URLs in text: `https?://[^\s<>"]+` ## Common Pitfalls - **Greedy matching**: `.*` matches as much as possible. Use `.*?` for non-greedy. - **Catastrophic backtracking**: Nested quantifiers like `(a+)+` can cause exponential processing time. - **Escaping special characters**: Characters like `.`, `*`, `(`, `)` need backslash escaping when used literally. ### Base64 Encoding: How It Works and When to Use It Base64 converts binary data into ASCII text, making it safe for transmission through text-based systems. Learn when Base64 is the right choice and when alternatives like hex encoding or URL encoding are more appropriate. - URL: https://peasytext.com/guides/base64-encoding-guide/ - Category: How-To - Reading time: 1 min - Words: 246 Key takeaways: - Base64 is an encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). - Base64 takes three bytes of binary data (24 bits) and splits them into four 6-bit groups. - Embedding images in CSS/HTML**: Small icons (under 2 KB) can be inlined as data URIs. - Large files**: The 33% size overhead makes Base64 inefficient for large data. - Standard (RFC 4648)**: Uses `+` and `/`, padded with `=`. ## What Is Base64? Base64 is an encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It's used to embed binary data in text-based formats like JSON, XML, HTML, and email. ## How Base64 Works Base64 takes three bytes of binary data (24 bits) and splits them into four 6-bit groups. Each 6-bit group maps to one of 64 characters. This means Base64 output is always 33% larger than the input. ### Size Impact | Input Size | Base64 Size | Overhead | |-----------|------------|----------| | 1 KB | 1.33 KB | +33% | | 100 KB | 133 KB | +33% | | 1 MB | 1.33 MB | +33% | ## When to Use Base64 - **Embedding images in CSS/HTML**: Small icons (under 2 KB) can be inlined as data URIs. - **API payloads**: Sending binary data in JSON request/response bodies. - **Email attachments**: MIME encoding uses Base64 for binary attachments. - **Authentication tokens**: HTTP Basic Auth encodes credentials in Base64. ## When NOT to Use Base64 - **Large files**: The 33% size overhead makes Base64 inefficient for large data. - **Images over 2-5 KB**: Use regular file URLs instead of data URIs. - **Encryption substitute**: Base64 is encoding, not encryption. It provides zero security. ## Variants - **Standard (RFC 4648)**: Uses `+` and `/`, padded with `=`. - **URL-safe**: Replaces `+` with `-` and `/` with `_` for use in URLs. - **No padding**: Omits trailing `=` characters. ### Lorem Ipsum Alternatives: Realistic Placeholder Content Lorem Ipsum has been the standard placeholder text since the 1500s, but realistic placeholder content produces better design feedback. This guide covers alternatives and best practices for prototype content. - URL: https://peasytext.com/guides/lorem-ipsum-alternatives/ - Category: Best Practice - Reading time: 1 min - Words: 230 Key takeaways: - Lorem Ipsum looks like real text but conveys no meaning. - Real headlines range from 3 to 15 words. - Use text that matches your content domain: ## The Problem with Lorem Ipsum Lorem Ipsum looks like real text but conveys no meaning. This creates a dangerous illusion — designs that look great with placeholder text may fail with real content of different lengths, languages, or complexity. ## Why Realistic Content Matters ### Length Variations Real headlines range from 3 to 15 words. Real names range from "Li" to "Wolfeschlegelsteinhausenbergerdorff." Lorem Ipsum doesn't expose these edge cases. ### Content Hierarchy Real content has meaning that affects visual hierarchy. A product description with technical specs reads differently than a lifestyle blog post. Testing with realistic content reveals hierarchy problems early. ## Alternatives to Lorem Ipsum ### Domain-Specific Placeholder Text Use text that matches your content domain: - Legal: Sample terms and conditions. - Medical: Anonymized patient summaries. - E-commerce: Realistic product descriptions. - News: Public domain articles. ### Random Data Generators Generate realistic fake data for prototyping: - Names, addresses, phone numbers. - Email addresses and usernames. - Dates, currencies, quantities. ## Best Practices 1. **Use real content early**: Get actual content into designs as soon as possible. 2. **Test extremes**: Include very short and very long content in your tests. 3. **Include numbers**: Mix text with numbers, dates, and special characters. 4. **Consider i18n**: Test with languages that use different scripts, RTL text, and CJK characters. 5. **Mark placeholders clearly**: Ensure nobody ships Lorem Ipsum to production. ### Markdown vs Rich Text vs Plain Text: When to Use Each Choosing between Markdown, rich text, and plain text affects portability, readability, and editing workflow. This comparison helps you select the right text format for documentation, notes, and content creation. - URL: https://peasytext.com/guides/markdown-vs-rich-text-vs-plain-text/ - Category: Comparison - Reading time: 1 min - Words: 213 Key takeaways: - Each text format represents a different philosophy about how formatting should be handled. - Plain text contains only characters with no formatting information. - Markdown uses simple punctuation characters to indicate formatting: `#` for headings, `*` for emphasis, `-` for lists. - Rich text stores formatting instructions alongside content. ## The Three Text Paradigms Each text format represents a different philosophy about how formatting should be handled. ## Plain Text Plain text contains only characters with no formatting information. It's the most portable and long-lived format — a plain text file from 1970 is still perfectly readable today. **Best for:** Configuration files, code, logs, data interchange, email. ## Markdown Markdown uses simple punctuation characters to indicate formatting: `#` for headings, `*` for emphasis, `-` for lists. It's readable as plain text but can be rendered into formatted HTML or PDF. **Best for:** Technical documentation, README files, blogs, notes, knowledge bases. ## Rich Text Rich text stores formatting instructions alongside content. Formats like RTF, DOCX, and Google Docs provide WYSIWYG editing with fonts, colors, images, and complex layouts. **Best for:** Business documents, letters, resumes, printed materials. ## Comparison | Feature | Plain Text | Markdown | Rich Text | |---------|-----------|----------|----------| | Portability | Excellent | Very Good | Limited | | Version control | Excellent | Excellent | Poor | | Visual formatting | None | Basic | Full | | Learning curve | None | Low | Medium | | File size | Tiny | Small | Large | | Tool requirements | Any editor | Any editor | Specific apps | ### How to Convert Case and Clean Up Messy Text Messy text with inconsistent capitalization, extra whitespace, and mixed formatting is a common problem. This guide covers tools and techniques for cleaning, transforming, and standardizing text efficiently. - URL: https://peasytext.com/guides/convert-case-clean-text/ - Category: How-To - Reading time: 1 min - Words: 223 Key takeaways: - Text from various sources often arrives in inconsistent formats: ALL CAPS from legacy databases, mixed case from OCR scans, extra spaces from copy-pasting, or invisible Unicode characters from web scraping. - UPPERCASE**: All characters capitalized. Used for headings, acronyms. - Remove leading and trailing whitespace from each line. - Text copied from the web may contain zero-width spaces, soft hyphens, non-breaking spaces, and other invisible Unicode characters. ## Common Text Mess Scenarios Text from various sources often arrives in inconsistent formats: ALL CAPS from legacy databases, mixed case from OCR scans, extra spaces from copy-pasting, or invisible Unicode characters from web scraping. ## Case Transformations ### Common Cases - **UPPERCASE**: All characters capitalized. Used for headings, acronyms. - **lowercase**: All characters in lowercase. Used for URLs, identifiers. - **Title Case**: First letter of each word capitalized. Used for headlines. - **Sentence case**: First letter of first word capitalized. Used for body text. - **camelCase**: Words joined, each word capitalized except the first. Used in code. - **snake_case**: Words joined with underscores. Used in Python, SQL. - **kebab-case**: Words joined with hyphens. Used in URLs, CSS classes. ## Whitespace Cleanup ### Trimming Remove leading and trailing whitespace from each line. This is the most basic cleanup operation and prevents issues with string comparison. ### Normalizing Spaces Replace multiple consecutive spaces with a single space. This commonly happens when copying from PDFs or formatted documents. ### Line Ending Normalization Different operating systems use different line endings: `\n` (Unix/macOS), `\r\n` (Windows), `\r` (old macOS). Normalize to your target platform to prevent display issues. ## Invisible Characters Text copied from the web may contain zero-width spaces, soft hyphens, non-breaking spaces, and other invisible Unicode characters. These can cause string comparison failures and parsing errors. ### How to Add Watermarks to Images Protect your images with text or logo watermarks. This guide covers watermark placement strategies, opacity settings, and how to balance copyright protection with image aesthetics. - URL: https://peasytext.com/guides/how-to-add-watermark-to-images/ - Category: How-To - Reading time: 1 min - Words: 149 ## Why Watermark Images Watermarks protect intellectual property by overlaying a visible mark that identifies the copyright holder. They deter unauthorized use while still allowing the image to be previewed and evaluated. ## Watermark Types ### Text Watermarks Simple text overlay with your name, brand, or copyright notice. Use a semi-transparent white or black text with a subtle drop shadow for visibility on any background. ### Logo Watermarks Your brand logo overlaid on the image. PNG logos with transparency work best. Size the logo to 10-20% of the image width for visibility without obstruction. ## Best Practices 1. **Opacity**: 30-50% transparency balances visibility and aesthetics 2. **Position**: Bottom-right is standard; center for maximum protection 3. **Size**: Large enough to be visible, small enough not to ruin the image 4. **Repetition**: Tiled watermarks prevent cropping to remove them 5. **Contrast**: Use white text on dark images, dark on light images ### Troubleshooting Character Encoding Problems Garbled text, question marks, and missing characters are symptoms of encoding mismatches. This guide helps you diagnose and fix the most common character encoding problems in web pages, files, and databases. - URL: https://peasytext.com/guides/troubleshooting-character-encoding/ - Category: Troubleshooting - Reading time: 1 min - Words: 222 Key takeaways: - Encoding issues have distinctive visual signatures that help you identify the specific problem. - If a web page shows garbled text, check these in order: - The golden rule: declare UTF-8 explicitly at every layer of your stack — file encoding, HTTP headers, HTML meta tags, database charset, and application code string handling. - File encoding: The actual file must be saved as UTF-8. ## Recognizing Encoding Problems Encoding issues have distinctive visual signatures that help you identify the specific problem. ## Common Symptoms ### Mojibake Patterns | You See | Likely Cause | |---------|-------------| | `é` instead of `e` | UTF-8 decoded as Latin-1 | | `???` or boxes | Font missing the character | | `&#xFFFD;` (replacement char) | Invalid byte sequence | | Double-encoded chars | Data encoded twice | ### HTML Pages If a web page shows garbled text, check these in order: 1. **HTTP header**: `Content-Type: text/html; charset=utf-8` 2. **Meta tag**: `<meta charset="utf-8">` 3. **File encoding**: The actual file must be saved as UTF-8. All three must agree. If any one differs, the browser may misinterpret the text. ### CSV Files Excel assumes CSV files use the system's default encoding (often Windows-1252 on Windows). To ensure Excel opens your CSV correctly: - Add a UTF-8 BOM (`EF BB BF`) at the start of the file. - Or use the Text Import Wizard and explicitly select UTF-8. ### Database Issues Ensure your database connection, table, and columns all use the same encoding. In MySQL, check `character_set_client`, `character_set_connection`, and `character_set_results`. In PostgreSQL, check `client_encoding`. ## Prevention The golden rule: declare UTF-8 explicitly at every layer of your stack — file encoding, HTTP headers, HTML meta tags, database charset, and application code string handling. ### Best Practices for Counting Words, Characters, and Lines Accurate text counting is important for meeting length requirements, estimating reading time, and analyzing content. This guide covers the nuances of counting words across different languages and contexts. - URL: https://peasytext.com/guides/word-character-line-counting-best-practices/ - Category: Best Practice - Reading time: 1 min - Words: 227 Key takeaways: - Counting words seems straightforward, but edge cases abound: hyphenated words, contractions, CJK characters (which don't use spaces between words), URLs, numbers, and abbreviations all complicate accurate counting. - Words are typically delimited by spaces and punctuation. - With spaces**: Counts every character including spaces and newlines. - Average reading speeds vary by language and content complexity. ## Why Counting Isn't Simple Counting words seems straightforward, but edge cases abound: hyphenated words, contractions, CJK characters (which don't use spaces between words), URLs, numbers, and abbreviations all complicate accurate counting. ## Word Counting Rules ### English and European Languages Words are typically delimited by spaces and punctuation. Most word counters split on whitespace and count the resulting tokens, treating hyphenated words as one or two words depending on the implementation. ### CJK Languages Chinese, Japanese, and Korean don't use spaces between words. Each character generally represents a unit of meaning. Word counting for CJK text typically counts each character individually. ## Character Counting Methods - **With spaces**: Counts every character including spaces and newlines. - **Without spaces**: Excludes space characters but includes punctuation. - **Letters only**: Counts only alphabetic characters. ## Platform-Specific Limits | Platform | Limit | Counting Method | |----------|-------|-----------------| | Twitter/X | 280 | Unicode characters (CJK = 2) | | Meta title | ~60 | Characters (pixels vary) | | Meta description | ~155 | Characters (pixels vary) | | SMS | 160/70 | GSM-7 chars / Unicode chars | | Google Ads headline | 30 | Characters | ## Reading Time Estimation Average reading speeds vary by language and content complexity. English averages 200-250 words per minute for web content. Technical or academic content typically runs slower at 150-200 WPM. ### How to Find and Replace Text Using Regular Expressions Regular expressions enable powerful pattern-based find and replace operations. Learn practical regex patterns for common text transformation tasks. - URL: https://peasytext.com/guides/how-to-find-replace-regex/ - Category: How-To - Reading time: 1 min - Words: 170 Key takeaways: - Standard find-and-replace handles exact text matches. - Capture groups `()` let you rearrange matched text. - Lookahead `(?=...)` matches a position before a pattern without including it. - Always test regex patterns on a small sample before applying to large text. - ## Essential Patterns | Pattern | Matches | Example | |---------|---------|--------| | `\d{3}-\d{4}` | Phone numbers | 555-1234 | | `[\w. ## Beyond Simple Find and Replace Standard find-and-replace handles exact text matches. Regular expressions match patterns — phone numbers, email addresses, dates, URLs — letting you transform text at scale with surgical precision. ## Essential Patterns | Pattern | Matches | Example | |---------|---------|--------| | `\d{3}-\d{4}` | Phone numbers | 555-1234 | | `[\w.]+@[\w.]+` | Email addresses | user@example.com | | `\d{1,2}/\d{1,2}/\d{4}` | Dates (M/D/YYYY) | 3/15/2025 | | `https?://\S+` | URLs | https://example.com/page | ## Capture Groups for Transformation Capture groups `()` let you rearrange matched text. For example, converting dates from MM/DD/YYYY to YYYY-MM-DD: pattern `(\d{2})/(\d{2})/(\d{4})` with replacement `$3-$1-$2`. ## Lookahead and Lookbehind Lookahead `(?=...)` matches a position before a pattern without including it. Lookbehind `(?<=...)` matches a position after a pattern. These are powerful for inserting or removing text at specific locations. ## Testing Regex Safely Always test regex patterns on a small sample before applying to large text. Use tools that highlight matches in real-time so you can verify the pattern captures exactly what you intend. ### How to Generate Lorem Ipsum Text Generate placeholder text for design mockups, wireframes, and prototypes using various Lorem Ipsum styles. - URL: https://peasytext.com/guides/how-to-generate-lorem-ipsum/ - Category: How-To - Reading time: 1 min - Words: 199 ## Generating Lorem Ipsum Text Lorem Ipsum has been the industry's standard dummy text since the 1500s. Modern generators offer far more than the classic Latin passage, providing options for different languages, themed text, and structured content blocks. ### Choosing the Right Style Classic Lorem Ipsum works well for formal design presentations where you want text that clearly reads as placeholder. For more natural-looking mockups, consider generators that produce text matching the cadence and word length of your target language. Some generators also offer "hipster ipsum" or "bacon ipsum" variants that add levity to internal reviews. ### Controlling Output Most generators let you specify paragraph count, sentence count, or word count. For responsive design testing, generate text blocks of varying lengths — short (50 words), medium (150 words), and long (400+ words) — to see how your layout handles different content volumes. This reveals overflow issues, truncation problems, and spacing inconsistencies. ### Best Practices Always replace placeholder text before publishing. Use a lint step or CI check that flags common Lorem Ipsum strings. For accessibility testing, use real content samples rather than placeholder text, since screen readers will attempt to read Lorem Ipsum aloud, producing confusing results for testers. ### How to Remove Duplicate Lines From Text Duplicate lines in data files, logs, and lists waste space and cause errors. Learn efficient methods to deduplicate text while preserving order. - URL: https://peasytext.com/guides/how-to-remove-duplicate-lines/ - Category: How-To - Reading time: 1 min - Words: 159 Key takeaways: - Duplicate lines commonly appear when merging data from multiple sources, copying text multiple times, or exporting from databases without DISTINCT clauses. - Exact deduplication removes lines that are byte-for-byte identical. - Some deduplication methods sort the output. - For small files (under 10,000 lines), in-memory deduplication is instant. - Decide whether 'Apple' and 'apple' are duplicates. ## Why Duplicates Appear Duplicate lines commonly appear when merging data from multiple sources, copying text multiple times, or exporting from databases without DISTINCT clauses. Log files may contain repeated error messages. ## Exact vs Fuzzy Deduplication Exact deduplication removes lines that are byte-for-byte identical. Fuzzy deduplication also catches near-duplicates — lines that differ only in whitespace, case, or punctuation. ## Preserving Order Some deduplication methods sort the output. If the original order matters (as in log files or chronological data), use order-preserving deduplication that keeps the first occurrence of each unique line. ## Large File Considerations For small files (under 10,000 lines), in-memory deduplication is instant. For larger files, hash-based approaches use less memory than storing complete lines. Browser-based tools can handle files up to several megabytes efficiently. ## Case Sensitivity Decide whether 'Apple' and 'apple' are duplicates. Case-insensitive deduplication is useful for name lists and categorized data. Case-sensitive deduplication is correct for code, passwords, and technical data. ### How to Add Watermarks to PDF Documents Watermarking PDFs protects intellectual property and marks documents as draft, confidential, or approved. Learn text and image watermarking techniques. - URL: https://peasytext.com/guides/how-to-watermark-pdf/ - Category: How-To - Reading time: 1 min - Words: 174 Key takeaways: - There are two main types of PDF watermarks: text-based and image-based. - The most common watermark style places text diagonally across the center of each page at roughly 45 degrees. - Company logos make effective watermarks. - When you need to watermark dozens of documents, batch processing saves significant time. - Note that watermarks added as overlay text can sometimes be removed by PDF editing tools. ## Types of Watermarks There are two main types of PDF watermarks: text-based and image-based. Text watermarks stamp words like 'CONFIDENTIAL' or 'DRAFT' across pages. Image watermarks overlay a logo or signature. ## Diagonal Text Watermarks The most common watermark style places text diagonally across the center of each page at roughly 45 degrees. The text is typically semi-transparent (20-40% opacity) and uses a light gray color so it doesn't obscure the underlying content. ## Image Watermarks Company logos make effective watermarks. For best results, use a PNG with transparent background and reduce opacity to 15-25%. Place the logo in a consistent position (center or bottom-right corner) across all pages. ## Batch Watermarking When you need to watermark dozens of documents, batch processing saves significant time. Upload all files, configure the watermark once, and apply it to every document simultaneously. ## Removing Watermarks Note that watermarks added as overlay text can sometimes be removed by PDF editing tools. For tamper-resistant watermarking, consider flattening the watermark into the page content, though this increases file size. ### How to Sort Text Lines Alphabetically and Numerically Sorting text lines helps organize data, find duplicates, and prepare content for processing. Learn alphabetical, numerical, and custom sorting techniques. - URL: https://peasytext.com/guides/how-to-sort-text-lines/ - Category: How-To - Reading time: 1 min - Words: 163 Key takeaways: - Alphabetical sorting orders lines from A to Z using Unicode code point comparison. - Standard alphabetical sorting treats numbers as text, so '10' sorts before '2'. - Reverse sorting (Z to A, or largest to smallest) is useful for finding the latest dates, highest values, or most recent entries in chronological data. - Tabular data (CSV, TSV) often needs sorting by a specific column. - Randomizing line order is useful for creating quiz questions, shuffling playlists, or randomizing survey options. ## Alphabetical Sorting Alphabetical sorting orders lines from A to Z using Unicode code point comparison. This is the most common sort for name lists, glossaries, and directories. Case sensitivity matters: uppercase letters sort before lowercase in standard comparison. ## Numerical Sorting Standard alphabetical sorting treats numbers as text, so '10' sorts before '2'. Numerical sorting interprets leading numbers as values, producing the correct order: 1, 2, 3, ..., 10, 11. ## Reverse Sorting Reverse sorting (Z to A, or largest to smallest) is useful for finding the latest dates, highest values, or most recent entries in chronological data. ## Sorting by Column Tabular data (CSV, TSV) often needs sorting by a specific column. Specify the delimiter and column number to sort by price, date, or any field without disrupting the row structure. ## Shuffle (Random Sort) Randomizing line order is useful for creating quiz questions, shuffling playlists, or randomizing survey options. Good randomization uses cryptographically secure random number generators to ensure fairness. ### How to Convert Markdown to Other Formats Convert Markdown documents to HTML, PDF, DOCX, and slides while preserving formatting and handling edge cases. - URL: https://peasytext.com/guides/how-to-convert-markdown-to-other-formats/ - Category: How-To - Reading time: 1 min - Words: 268 ## Converting Markdown Markdown's simplicity makes it the starting point for many document workflows. Converting to other formats requires understanding how each target format handles Markdown's features and limitations. ### Markdown to HTML The most straightforward conversion. Standard Markdown maps directly to HTML: headings become h1-h6, emphasis becomes em/strong, lists become ul/ol/li. GitHub-Flavored Markdown (GFM) adds tables, task lists, and fenced code blocks. For blog posts and web content, this conversion is usually sufficient — add a CSS stylesheet and you have a publishable page. ### Markdown to PDF This typically goes through HTML as an intermediate step, then uses a rendering engine (browser, wkhtmltopdf, or WeasyPrint) to generate PDF. The key challenge is pagination — Markdown has no concept of page breaks, so you may need to add explicit page break markers. Code blocks need careful handling to prevent overflow — long lines should wrap or scroll within the page width. ### Markdown to DOCX Converting to DOCX preserves most formatting but requires mapping Markdown styles to Word styles. Headings map to Heading 1-6 styles, code blocks need a monospace paragraph style, and tables need Word table formatting. The result is an editable document, but complex Markdown features (nested lists, footnotes, math) may not convert perfectly. ### Common Conversion Issues Images referenced with relative paths may break if the converter doesn't resolve paths relative to the source file. LaTeX math blocks ($$...$$) require a math rendering library. Emoji shortcodes (:smile:) may render as text rather than emoji in some converters. HTML embedded in Markdown is preserved in HTML output but stripped by most PDF and DOCX converters. ### How to Encode and Decode Base64 Data Base64 converts binary data to ASCII text for safe transmission. Learn how Base64 encoding works and its common uses in web development. - URL: https://peasytext.com/guides/how-to-encode-decode-base64/ - Category: How-To - Reading time: 1 min - Words: 185 Key takeaways: - Base64 encodes binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). - Data URIs**: Embedding images directly in HTML/CSS as `data:image/png;base64,...` - Standard Base64 uses `+` and `/` which are special characters in URLs. - Decoding reverses the process, converting the ASCII text back to binary. ## What Is Base64? Base64 encodes binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It's used to embed binary data in text-based formats like JSON, XML, HTML, and email. The output is ~33% larger than the input. ## Common Use Cases - **Data URIs**: Embedding images directly in HTML/CSS as `data:image/png;base64,...` - **Email attachments**: MIME encoding uses Base64 for binary attachments. - **API payloads**: Sending binary files in JSON API requests. - **JWT tokens**: Header and payload are Base64URL-encoded. ## Base64 vs Base64URL Standard Base64 uses `+` and `/` which are special characters in URLs. Base64URL replaces these with `-` and `_`, making encoded data safe for URLs and filenames. JWT tokens and URL parameters use Base64URL. ## Performance Considerations Base64 adds 33% overhead. A 1MB image becomes 1.33MB when Base64-encoded. For small inline images (under 10KB), the overhead is acceptable. For larger files, separate file uploads are more efficient. ## Decoding Decoding reverses the process, converting the ASCII text back to binary. If the Base64 string is corrupted (wrong length, invalid characters), decoding fails. Common issues include missing padding (`=`) characters. ### How to Extract Emails, URLs, and Phone Numbers From Text Extracting structured data from unstructured text saves hours of manual copying. Learn pattern-based extraction for common data types. - URL: https://peasytext.com/guides/how-to-extract-data-from-text/ - Category: How-To - Reading time: 1 min - Words: 154 Key takeaways: - The most commonly extracted data types are email addresses, URLs, phone numbers, IP addresses, and dates. - Email addresses follow the pattern `local@domain.tld`. - URLs can be tricky to extract because they contain special characters that might be confused with surrounding punctuation. - Phone numbers vary dramatically by country. - Extracted data often needs normalization. ## Common Extraction Targets The most commonly extracted data types are email addresses, URLs, phone numbers, IP addresses, and dates. Each has recognizable patterns that can be matched programmatically. ## Email Extraction Email addresses follow the pattern `local@domain.tld`. While the full RFC 5322 email specification is complex, a practical extraction pattern catches 99.9% of real-world addresses. ## URL Extraction URLs can be tricky to extract because they contain special characters that might be confused with surrounding punctuation. Look for patterns starting with `http://` or `https://` and handle trailing periods and parentheses carefully. ## Phone Number Extraction Phone numbers vary dramatically by country. US numbers might appear as (555) 123-4567, 555-123-4567, or 5551234567. International numbers add country codes and different grouping conventions. ## Post-Extraction Cleanup Extracted data often needs normalization. Phone numbers should be converted to a standard format. Email addresses should be lowercased. URLs should have trailing punctuation removed. Deduplication removes any repeated values. ### How to Add Text Overlays to Images Adding text to images creates social media graphics, memes, quotes, and promotional materials. Learn typography and positioning best practices. - URL: https://peasytext.com/guides/how-to-add-text-overlays-images/ - Category: How-To - Reading time: 1 min - Words: 178 Key takeaways: - Sans-serif fonts (Arial, Helvetica, Inter) work best for short, impactful text overlays. - Text must contrast with the background image. - Place text where it doesn't obscure the image's subject. - Use size, weight, and color to create hierarchy. - Save text-overlay images as PNG if the text needs to be sharp and crisp. ## Choosing the Right Font Sans-serif fonts (Arial, Helvetica, Inter) work best for short, impactful text overlays. They're readable at small sizes and photograph well. Avoid decorative fonts that sacrifice legibility for style. ## Text Contrast and Readability Text must contrast with the background image. Common techniques include adding a semi-transparent dark overlay behind the text, using a text shadow or stroke, or placing text over darker or simpler areas of the image. ## Text Positioning Place text where it doesn't obscure the image's subject. Bottom-center works for captions. Upper-third works for headlines. Avoid placing text directly over faces or key product features. ## Typography Hierarchy Use size, weight, and color to create hierarchy. The main message should be the largest element. Supporting text should be smaller and potentially a different color. Limit text overlays to 2-3 levels of hierarchy. ## Export Considerations Save text-overlay images as PNG if the text needs to be sharp and crisp. JPEG compression can create artifacts around text edges. For web use, WebP offers a good balance of quality and file size. ### Plain Text vs Rich Text vs Markdown: Format Comparison Each text format serves different purposes. Plain text is universal, rich text supports formatting, and Markdown balances readability with structure. - URL: https://peasytext.com/guides/plain-text-vs-rich-text-vs-markdown/ - Category: Comparison - Reading time: 1 min - Words: 227 Key takeaways: - Plain text contains only characters — no formatting, no styles, no embedded media. - Rich Text Format supports bold, italic, fonts, colors, and basic formatting. - Markdown is plain text with lightweight formatting syntax. - Use plain text for data, logs, and configuration. ## Plain Text (.txt) Plain text contains only characters — no formatting, no styles, no embedded media. It's universally compatible, tiny in file size, and will be readable on any device for decades to come. Plain text is the format of choice for configuration files, log files, and data exchange. ## Rich Text (.rtf) Rich Text Format supports bold, italic, fonts, colors, and basic formatting. It's a Microsoft-developed interchange format that most word processors can read. RTF files are larger than plain text but smaller than DOCX. ## Markdown (.md) Markdown is plain text with lightweight formatting syntax. `**bold**` renders as bold, `# Heading` creates a heading, and `[link](url)` creates a hyperlink. Markdown files are readable in any text editor but render beautifully when processed. ## Comparison Table | Feature | Plain Text | Rich Text | Markdown | |---------|-----------|-----------|----------| | File size | Smallest | Medium | Small | | Formatting | None | Full | Basic | | Readability (raw) | Good | Poor | Excellent | | Version control | Excellent | Poor | Excellent | | Learning curve | None | None | Minimal | ## When to Use Each Use plain text for data, logs, and configuration. Use rich text when you need formatting but want cross-platform compatibility. Use Markdown for documentation, README files, notes, and any content that lives alongside code. ### Accessible Color Contrast for UI Design Meet WCAG color contrast requirements for text, UI components, and graphical elements in web interfaces. - URL: https://peasytext.com/guides/accessible-color-contrast-ui-design/ - Category: Best Practice - Reading time: 2 min - Words: 301 Key takeaways: - WCAG 2.1 defines minimum contrast ratios that ensure text and interactive elements are perceivable by users with low vision and color vision deficiencies. - Disabled button text is exempt from contrast requirements, but the disabled state itself must be perceivable. - Never use color as the only means of conveying information — add icons, patterns, or text labels. ## Color Contrast for Accessibility WCAG 2.1 defines minimum contrast ratios that ensure text and interactive elements are perceivable by users with low vision and color vision deficiencies. These are legal requirements in many jurisdictions. ### Contrast Ratio Requirements Level AA (minimum): 4.5:1 for normal text, 3:1 for large text (18pt or 14pt bold). Level AAA (enhanced): 7:1 for normal text, 4.5:1 for large text. Non-text elements (icons, borders, form field outlines) require 3:1 contrast against adjacent colors. These ratios apply to the specific color combination, not to the colors individually. ### Common Failures Light gray text on white backgrounds is the most frequent failure. Placeholder text in form fields often fails contrast requirements. Disabled button text is exempt from contrast requirements, but the disabled state itself must be perceivable. Focus indicators must be visible against all backgrounds they appear on. ### Testing Tools Use browser extensions that overlay contrast ratios directly on your UI. Check each text color against its actual background — components used on different page sections may pass on one background and fail on another. Automated tools catch most issues, but manual review is needed for gradient backgrounds, images with text overlays, and interactive states. ### Designing with Constraints Rather than designing freely and fixing contrast afterward, start with accessible color palettes. For any brand color, generate a full scale (100-900) and identify which combinations meet AA and AAA requirements. Document these as the approved text/background pairings in your design system. ### Beyond Contrast Ratios Color contrast is necessary but not sufficient for accessibility. Never use color as the only means of conveying information — add icons, patterns, or text labels. Ensure that links are distinguishable from surrounding text without relying on color alone (underline is the simplest solution). Test your designs with color blindness simulation … ### Troubleshooting Line Ending Issues (CRLF vs LF) Different operating systems use different line endings, causing text files to display incorrectly or break scripts. Learn how to detect and fix the issue. - URL: https://peasytext.com/guides/troubleshooting-line-endings-crlf-lf/ - Category: Troubleshooting - Reading time: 1 min - Words: 186 Key takeaways: - Windows uses CRLF (\r\n), Unix/macOS uses LF (\n), and old Mac Classic used CR (\r). - Text appears as one long line (LF file opened on old Windows software). - Look for `^M` characters at line ends in terminal editors. - Convert CRLF to LF for Unix/macOS use. - Configure Git to handle line endings consistently: `git config core.autocrlf true` on Windows, `git config core.autocrlf input` on macOS/Linux. ## The Line Ending Problem Windows uses CRLF (\r\n), Unix/macOS uses LF (\n), and old Mac Classic used CR (\r). When files move between systems, line endings can cause rendering problems and break scripts. ## Symptoms - Text appears as one long line (LF file opened on old Windows software). - Extra blank lines appear between every line (CRLF on some Unix viewers). - Shell scripts fail with `\r: command not found` errors. - Git shows every line as changed despite no content modifications. ## Detection Look for `^M` characters at line ends in terminal editors. In a hex editor, CRLF shows as `0D 0A` and LF shows as `0A`. Many text editors show line endings in the status bar. ## Fixing Line Endings Convert CRLF to LF for Unix/macOS use. Convert LF to CRLF for Windows batch scripts. Most modern editors handle this automatically, but bulk conversion tools are needed for large file collections. ## Git Configuration Configure Git to handle line endings consistently: `git config core.autocrlf true` on Windows, `git config core.autocrlf input` on macOS/Linux. A `.gitattributes` file can enforce settings per file type. ### Slug Generation and URL-Safe String Best Practices Generate clean, SEO-friendly URL slugs from titles and names, handling Unicode, transliteration, and edge cases. - URL: https://peasytext.com/guides/slug-generation-url-safe-strings/ - Category: Best Practice - Reading time: 1 min - Words: 243 ## URL Slug Generation Clean URL slugs improve SEO, readability, and shareability. Converting arbitrary text into URL-safe strings requires handling Unicode characters, multiple whitespace patterns, and special characters consistently. ### Basic Slug Rules A well-formed slug uses only lowercase ASCII letters, digits, and hyphens. Leading and trailing hyphens are removed. Multiple consecutive hyphens are collapsed to one. Common word separators (spaces, underscores, dots) become hyphens. The result should be a readable, meaningful summary of the content. ### Unicode and Transliteration For international content, transliterate Unicode characters to ASCII equivalents before slugifying: ü→ue, ñ→n, 日本→nihon. Libraries like python-slugify and slugify.js handle this automatically for most scripts. For CJK characters without standard transliterations, consider using romanization systems (Pinyin, Romaji) or keeping the original characters in the URL if your stack supports IRI. ### SEO Considerations Keep slugs under 60 characters — search engines may truncate longer URLs. Remove stop words (the, a, an, is, of) to focus on keywords, but only if the result remains readable. Avoid including dates or version numbers unless the content is inherently temporal. Once a slug is published and indexed, never change it without setting up a 301 redirect. ### Collision Handling When two different titles generate the same slug, append a numeric suffix (my-title, my-title-2, my-title-3). Check for collisions at generation time, not just at database insert time, to provide immediate feedback. For high-volume systems, consider appending a short random suffix instead of sequential numbers to avoid race conditions. ### Text Diff and Comparison: Finding Changes Between Versions Comparing text versions reveals exactly what changed. Learn how diff algorithms work and how to use them for code review, document comparison, and data validation. - URL: https://peasytext.com/guides/text-diff-comparison-guide/ - Category: How-To - Reading time: 1 min - Words: 175 Key takeaways: - Diff algorithms compare two texts and identify the minimal set of changes (additions, deletions, modifications) needed to transform one into the other. - Line-level diff shows which lines changed. - Side-by-side view shows the old and new versions in parallel columns, making it easy to scan for differences. - Code review**: Compare code versions to understand changes. - Many diffs are cluttered by whitespace changes (indentation, trailing spaces). ## How Diff Works Diff algorithms compare two texts and identify the minimal set of changes (additions, deletions, modifications) needed to transform one into the other. The most common algorithm is the longest common subsequence (LCS) approach. ## Line-Level vs Character-Level Diff Line-level diff shows which lines changed. Character-level diff highlights exactly which characters within a line were modified. Character-level is more precise but can be overwhelming for large changes. ## Side-by-Side vs Unified View Side-by-side view shows the old and new versions in parallel columns, making it easy to scan for differences. Unified view interleaves additions and deletions in a single stream, using +/- prefixes. ## Use Cases - **Code review**: Compare code versions to understand changes. - **Contract comparison**: Find what changed between contract drafts. - **Data validation**: Verify that a transformation produced expected results. - **Configuration audit**: Detect unauthorized changes to config files. ## Ignoring Whitespace Many diffs are cluttered by whitespace changes (indentation, trailing spaces). Most diff tools offer options to ignore whitespace, focus on content changes, and collapse unchanged sections. ### How to Extract Text From Scanned PDFs (OCR) Scanned PDFs contain images of text, not actual text. Learn how OCR (Optical Character Recognition) can make scanned documents searchable and editable. - URL: https://peasytext.com/guides/how-to-ocr-pdf/ - Category: How-To - Reading time: 1 min - Words: 192 Key takeaways: - Optical Character Recognition (OCR) analyzes images of text and converts them into machine-readable characters. - If you can't select or search text in a PDF, it's likely a scanned image. - Several factors affect OCR quality: - OCR output often contains minor errors, especially with unusual fonts or low-quality scans. - Modern browser-based OCR uses WebAssembly-compiled engines (like Tesseract.js) that process documents entirely on your device. ## What Is OCR? Optical Character Recognition (OCR) analyzes images of text and converts them into machine-readable characters. When applied to a scanned PDF, OCR adds a hidden text layer behind each page image, making the document searchable and allowing copy-paste. ## When You Need OCR If you can't select or search text in a PDF, it's likely a scanned image. This is common with documents from older scanners, photographed pages, and PDFs created from fax transmissions. ## OCR Accuracy Factors Several factors affect OCR quality: - **Scan resolution**: 300 DPI minimum; 600 DPI for small text. - **Image quality**: Clean, high-contrast scans produce better results. - **Language**: Latin-script languages achieve 99%+ accuracy; CJK and handwriting are harder. - **Font style**: Standard printed fonts are recognized well; decorative fonts less so. ## Post-OCR Cleanup OCR output often contains minor errors, especially with unusual fonts or low-quality scans. Review the extracted text for common mistakes like confusing '1' with 'l', '0' with 'O', and misread punctuation. ## Browser-Based OCR Modern browser-based OCR uses WebAssembly-compiled engines (like Tesseract.js) that process documents entirely on your device. This means sensitive scanned documents never leave your computer. ### Best Practices for Cleaning Messy Data in Text Files Messy text data — extra spaces, inconsistent formatting, mixed encodings — creates problems for processing. Learn systematic approaches to text cleanup. - URL: https://peasytext.com/guides/best-practices-cleaning-text-data/ - Category: Best Practice - Reading time: 1 min - Words: 177 Key takeaways: - Messy text data typically suffers from multiple issues: inconsistent line endings, mixed encodings, extra whitespace, invisible characters, and inconsistent delimiters. - Convert everything to UTF-8 first. - Convert all line endings to a single style (LF for processing, CRLF for Windows output). - Remove leading and trailing whitespace from each line. - CSV and TSV files may use inconsistent delimiters. ## Common Text Data Problems Messy text data typically suffers from multiple issues: inconsistent line endings, mixed encodings, extra whitespace, invisible characters, and inconsistent delimiters. Cleaning should address these systematically. ## Step 1: Normalize Encoding Convert everything to UTF-8 first. Mixed encodings (some lines UTF-8, others Latin-1) cause garbled characters. Detect the encoding of each file and convert before any other processing. ## Step 2: Normalize Line Endings Convert all line endings to a single style (LF for processing, CRLF for Windows output). Mixed line endings cause tools to miscount lines and split records. ## Step 3: Trim Whitespace Remove leading and trailing whitespace from each line. Replace multiple consecutive spaces with single spaces. Remove blank lines (or reduce multiple blanks to one). ## Step 4: Normalize Delimiters CSV and TSV files may use inconsistent delimiters. Some lines might use commas while others use semicolons. Standardize to one delimiter format. ## Step 5: Validate and Report After cleaning, validate the output. Count lines, check character distribution, and sample-check transformed content to verify the cleanup didn't damage data. ### Image SEO Best Practices: Alt Text, File Names, and Lazy Loading Optimized images improve search rankings, accessibility, and page speed. Learn how to name, describe, and serve images for maximum SEO benefit. - URL: https://peasytext.com/guides/image-seo-best-practices/ - Category: Best Practice - Reading time: 1 min - Words: 164 Key takeaways: - Search engines use file names as a ranking signal. - Alt text serves two purposes: accessibility for screen reader users and context for search engines. - Use the `srcset` attribute to serve different sizes for different devices. - Add `loading="lazy"` to images below the fold. - For image-heavy sites, include images in your XML sitemap. ## File Naming Search engines use file names as a ranking signal. Name images descriptively: `blue-running-shoes-nike-pegasus.webp` is far better than `IMG_4392.jpg`. Use hyphens to separate words and keep names under 50 characters. ## Alt Text Alt text serves two purposes: accessibility for screen reader users and context for search engines. Write alt text that describes what the image shows in 1-2 sentences. Avoid keyword stuffing — describe naturally. ## Responsive Images Use the `srcset` attribute to serve different sizes for different devices. A phone doesn't need a 4000px image. Providing appropriate sizes reduces bandwidth and improves Core Web Vitals scores. ## Lazy Loading Add `loading="lazy"` to images below the fold. This defers loading until the image is about to enter the viewport, significantly improving initial page load time. Never lazy-load the LCP (Largest Contentful Paint) image. ## Image Sitemaps For image-heavy sites, include images in your XML sitemap. This helps search engines discover images that might be loaded dynamically or embedded in JavaScript galleries. ### How to Clean and Normalize Text Data Remove invisible characters, normalize whitespace, fix encoding issues, and standardize text for data processing. - URL: https://peasytext.com/guides/how-to-clean-normalize-text-data/ - Category: How-To - Reading time: 2 min - Words: 302 ## Text Data Cleaning Raw text data from web scraping, user input, OCR, and file imports contains invisible problems: zero-width characters, mixed line endings, non-breaking spaces, and encoding errors. Cleaning text before processing prevents downstream failures. ### Invisible Character Removal Text from web pages often contains zero-width spaces (U+200B), zero-width joiners (U+200D), soft hyphens (U+00AD), and byte order marks (U+FEFF). These characters are invisible in most editors but cause string comparisons to fail, word counts to be wrong, and data deduplication to miss matches. Strip them as the first cleaning step. ### Whitespace Normalization Multiple consecutive spaces, tabs mixed with spaces, non-breaking spaces (U+00A0), em spaces (U+2003), and thin spaces (U+2009) all appear as whitespace but are different characters. Normalize by replacing all Unicode whitespace characters with standard spaces, then collapsing multiple spaces into one. Trim leading and trailing whitespace from each line. ### Line Ending Standardization Windows uses CRLF (\r\n), Unix uses LF (\n), and classic Mac uses CR (\r). Mixed line endings in a single file cause parsing failures. Standardize to LF for web and Unix processing, CRLF for Windows-specific output. Many text processing issues traced to "mysterious extra blank lines" are actually caused by CRLF files processed by LF-expecting tools. ### Unicode Normalization The same visual character can have multiple Unicode representations. The letter "é" can be a single code point (U+00E9, NFC form) or two code points (e + combining acute accent, NFD form). Without normalization, string comparison, sorting, and searching produce inconsistent results. Use NFC normalization for general text processing and NFKC for search indexing. ### Practical Cleaning Pipeline Apply these steps in order: decode to UTF-8, apply NFKC normalization, strip zero-width and control characters, normalize whitespace, standardize line endings, trim lines. This pipeline handles the vast majority of real-world text cleaning needs without losing … ### Image Accessibility Best Practices Make images accessible to all users including those using screen readers, braille displays, and assistive technologies. Learn WCAG guidelines for alt text, decorative images, complex graphics, and color contrast. - URL: https://peasytext.com/guides/image-accessibility-best-practices/ - Category: Best Practice - Reading time: 1 min - Words: 197 Key takeaways: - Every meaningful image must have an `alt` attribute that describes its content and purpose. - 1.1.1 Non-text Content** (Level A): All images need text alternatives - ## Alt Text Fundamentals Every meaningful image must have an `alt` attribute that describes its content and purpose. ## Alt Text Fundamentals Every meaningful image must have an `alt` attribute that describes its content and purpose. Screen readers announce this text to users who cannot see the image. ## Alt Text Guidelines | Image Type | Alt Text Approach | |------------|------------------| | Informative photo | Describe content: "Golden retriever playing fetch in a park" | | Functional icon | Describe action: "Search" or "Close menu" | | Decorative | Empty alt: `alt=""` (screen reader skips it) | | Complex chart | Brief alt + detailed text description nearby | | Text in image | Include the full text in alt | ## WCAG Requirements - **1.1.1 Non-text Content** (Level A): All images need text alternatives - **1.4.5 Images of Text** (Level AA): Avoid text in images when possible - **1.4.11 Non-text Contrast** (Level AA): UI graphics need 3:1 contrast ratio ## Common Mistakes 1. Starting alt text with "Image of" or "Picture of" (redundant) 2. Using file names as alt text ("IMG_4523.jpg") 3. Stuffing keywords into alt text (hurts SEO and accessibility) 4. Missing alt on meaningful images (WCAG Level A failure) 5. Adding alt text to purely decorative images (adds noise for screen readers) ### Responsive Typography: Fluid Text Sizing Strategies Fixed font sizes don't adapt to different screen sizes. Learn how to implement fluid typography that scales smoothly between mobile and desktop viewports. - URL: https://peasytext.com/guides/responsive-typography-fluid-text-sizing/ - Category: How-To - Reading time: 1 min - Words: 250 ## The Problem with Fixed Sizes Using a single font-size for all screen widths creates readability issues. Text sized for desktop becomes too large on mobile, consuming valuable viewport space. Text sized for mobile becomes too small on large monitors, forcing unnecessary scrolling. ### The clamp() Approach CSS clamp() sets a minimum, preferred, and maximum value in one declaration: ```css h1 { font-size: clamp(1.75rem, 4vw + 0.5rem, 3rem); } p { font-size: clamp(1rem, 1.5vw + 0.5rem, 1.25rem); } ``` This creates text that scales with viewport width while staying within readable bounds. The middle value (preferred) uses viewport units combined with a fixed value for smoother scaling. ### Type Scale Ratios A type scale is a set of harmonious font sizes based on a ratio. Common ratios: 1.25 (Major Third), 1.333 (Perfect Fourth), 1.5 (Perfect Fifth). Starting from a base size of 1rem, multiply by the ratio for each level: 1rem, 1.25rem, 1.563rem, 1.953rem, 2.441rem. ### Line Height Considerations Larger text needs tighter line height. A body text line-height of 1.5-1.7 works well, but headings should use 1.1-1.3. Line length (measure) should stay between 45-75 characters per line for optimal readability — adjust container max-width accordingly. ### Testing Fluid Typography Test at the minimum, maximum, and several intermediate viewport widths. Check that text doesn't become too small on narrow screens or too large on ultra-wide monitors. Verify that line lengths stay readable at all sizes. Test with browser zoom levels from 50% to 200% to ensure the typography remains coherent. ### How to Extract and Transform Structured Data from Text Parse emails, addresses, phone numbers, dates, and URLs from unstructured text using regex and pattern matching. - URL: https://peasytext.com/guides/how-to-extract-structured-data-from-text/ - Category: How-To - Reading time: 2 min - Words: 313 ## Extracting Structured Data from Text Unstructured text contains valuable structured data — email addresses, phone numbers, dates, URLs, prices, and identifiers. Extracting this data accurately requires understanding the patterns and edge cases of each data type. ### Email Extraction The RFC 5322 email specification allows a surprising range of characters, but practical extraction uses simpler patterns. Match sequences of alphanumeric characters, dots, hyphens, and underscores, followed by @, followed by a domain with at least one dot. Be aware of edge cases: plus-addressed emails (user+tag@domain.com), subdomains (user@mail.domain.com), and new TLDs (.museum, .technology). ### Phone Number Parsing Phone numbers appear in dozens of formats: (555) 123-4567, +1-555-123-4567, 555.123.4567, 5551234567. Rather than writing one regex to match all formats, strip all non-digit characters first, then validate the resulting digit sequence against known country formats. The E.164 format (+[country][subscriber]) is the universal normalized form. ### Date Recognition Dates are ambiguous: 01/02/03 could be January 2, 2003 (US), February 1, 2003 (UK), or 2001 February 3 (ISO). When extracting dates from text, look for unambiguous patterns first (written month names, ISO 8601 format), then fall back to locale-specific patterns with clear documentation about which interpretation you're using. ### URL Detection URLs in text may or may not have the protocol prefix. Match both http(s)://domain.tld/path and bare domain.tld/path patterns. Be careful with punctuation at the end: "Visit example.com." — the period is sentence punctuation, not part of the URL. Parentheses in URLs (common in Wikipedia links) require careful handling to avoid matching surrounding sentence parentheses. ### Validation After Extraction Extraction finds patterns; validation confirms they're real. Extracted emails should have valid MX records on their domain. Phone numbers should have the correct number of digits for their country. URLs should be accessible (HTTP HEAD request). Dates should be valid calendar dates (no February 30th). … ### Video Aspect Ratios: Choosing the Right Format Select the optimal aspect ratio for different platforms and viewing contexts. - URL: https://peasytext.com/guides/video-aspect-ratios-choosing-right-format/ - Category: How-To - Reading time: 1 min - Words: 287 Key takeaways: - Aspect ratio describes the proportional relationship between width and height. - 16:9 (1920×1080, 3840×2160) is the universal standard for television, YouTube, and desktop web video. - 9:16 (1080×1920) dominates mobile-first platforms: TikTok, Instagram Reels, YouTube Shorts, and Snapchat. - Square video (1080×1080) works well on Instagram feed posts and Facebook. - 21:9 (or 2.39:1) is the traditional cinema widescreen ratio. ## Understanding Aspect Ratios Aspect ratio describes the proportional relationship between width and height. The choice of aspect ratio affects viewer experience, platform compatibility, and creative framing. Shooting in the wrong ratio means cropping later, which loses resolution and compositional control. ## 16:9 — The Standard 16:9 (1920×1080, 3840×2160) is the universal standard for television, YouTube, and desktop web video. It matches modern monitor proportions and provides a balanced widescreen view. For content primarily consumed on computers and TVs, 16:9 is the safe default. ## 9:16 — Vertical Video 9:16 (1080×1920) dominates mobile-first platforms: TikTok, Instagram Reels, YouTube Shorts, and Snapchat. Vertical video fills the phone screen completely, maximizing visual impact. For social media content targeting mobile users, 9:16 is essential. It also works well for stories and ephemeral content. ## 1:1 — Square Format Square video (1080×1080) works well on Instagram feed posts and Facebook. It takes up more screen space than 16:9 on mobile feeds. Square is also effective for product demonstrations, tutorial snippets, and content that needs to work across multiple platforms without reframing. ## 21:9 — Cinematic Ultrawide 21:9 (or 2.39:1) is the traditional cinema widescreen ratio. It creates a dramatic, immersive feel and works well for narrative content, travel videos, and visual storytelling. However, it displays with letterbox bars on standard screens, reducing the effective viewing area on mobile devices. ## Multi-Platform Strategy If creating for multiple platforms, shoot in 16:9 at the highest resolution available. Frame your subjects with extra headroom and side space so the video can be cropped to 9:16 and 1:1 in post-production. Some creators shoot in 4:5 as a compromise that crops well to both 9:16 and 16:9. Always plan your framing for the primary platform first. ### Text Comparison and Diff Algorithms Explained Understand how diff algorithms work, compare line-level vs word-level diffs, and choose the right approach for your use case. - URL: https://peasytext.com/guides/text-comparison-diff-algorithms-explained/ - Category: Comparison - Reading time: 2 min - Words: 319 ## Text Comparison Algorithms Diff algorithms find the differences between two text documents. The choice of algorithm affects both the quality of the diff output and the performance on large documents. ### Line-Level Diff The classic diff algorithm (based on the longest common subsequence, LCS) compares documents line by line. Lines are either added, removed, or unchanged. This works well for code and configuration files where changes typically add, remove, or modify complete lines. The output is compact and easy to read for developers familiar with unified diff format. ### Word-Level Diff For prose and documentation, line-level diffs are too coarse — a single changed word marks the entire line as modified. Word-level diff highlights exactly which words changed within a line, making it much easier to see what was actually modified. This is what Google Docs and Word's track changes use. The trade-off is more complex output that's harder to represent in plain text. ### Character-Level Diff The finest granularity, showing exactly which characters changed. Useful for comparing similar strings (typo detection, DNA sequences, password variants) but produces noisy output for general text. Most useful when combined with word-level diff — show word-level changes, then character-level within changed words. ### Semantic Diff Standard diffs treat all changes equally. Semantic diffs understand structure — they know that moving a paragraph is one change, not a deletion plus an insertion. For code, they understand that renaming a variable is one change affecting multiple locations. Semantic diffs are computationally expensive but produce much more meaningful output for large structural changes. ### Performance Considerations The basic LCS algorithm has O(n×m) time and space complexity. For large files (10,000+ lines), this becomes slow. Modern implementations use the Myers algorithm (O(n×d) where d is the number of differences) which is fast when documents are mostly … ### Text Transformation for Data Migration Projects Data migrations often require bulk text transformations — changing delimiters, reformatting dates, normalizing encodings, and restructuring flat files. - URL: https://peasytext.com/guides/text-transformation-data-migration/ - Category: How-To - Reading time: 1 min - Words: 224 ## The Data Migration Challenge Moving data between systems often means transforming thousands of text records from one format to another. CSV to JSON, fixed-width to delimited, date format changes, and encoding conversions are everyday tasks in migration projects. ### Common Transformations Delimiter changes convert between comma-separated, tab-separated, and pipe-separated formats. Date reformatting standardizes mixed formats (MM/DD/YYYY, DD-MM-YYYY, YYYY.MM.DD) into a single ISO 8601 format. Case normalization ensures consistent capitalization for names, addresses, and codes. ### Handling Edge Cases Real-world data is messy. Fields contain embedded delimiters, line breaks, and quote characters. Character encoding varies between records. Some rows have more or fewer fields than expected. Build your transformation pipeline to handle these edge cases gracefully — log anomalies, skip malformed records, and produce an exception report rather than silently corrupting data. ### Validation After Transformation Always validate the transformed output against the target schema. Check record counts match between source and destination. Verify that no data was truncated, that numeric values weren't corrupted by encoding changes, and that date conversions didn't shift by a day due to timezone handling. ### Incremental Processing For large datasets, process files in chunks rather than loading everything into memory. This prevents memory exhaustion and allows you to resume from the last successful chunk if an error occurs. Keep a checkpoint file recording the last successfully processed record. ### Troubleshooting Font Rendering Across Platforms The same font looks different on Windows, macOS, and Linux because each platform uses a different text rendering engine. Learn how to minimize cross-platform inconsistencies. - URL: https://peasytext.com/guides/troubleshooting-font-rendering-cross-platform/ - Category: Troubleshooting - Reading time: 1 min - Words: 247 ## Why Fonts Look Different macOS uses Core Text with subpixel antialiasing, producing smooth, slightly heavier text. Windows uses DirectWrite (or GDI on older systems), rendering text sharper but thinner. Linux uses FreeType with various hinting and antialiasing options depending on the distribution and user settings. ### The Weight Perception Problem A font at 400 weight on macOS appears visually similar to 500 weight on Windows because macOS applies more antialiasing smoothing. This means text that looks perfectly readable on a Mac designer's screen may appear thin and washed out on Windows. ### CSS Rendering Hints `-webkit-font-smoothing: antialiased` and `-moz-osx-font-smoothing: grayscale` on macOS reduce the smoothing that makes text appear heavier, bringing it closer to Windows rendering. However, this can make small text harder to read, so apply it selectively to headings and UI elements rather than body text. ### Font Choice Mitigations Choose fonts designed for screen rendering: Inter, Roboto, and Source Sans Pro are optimized for both macOS and Windows. System font stacks (`font-family: system-ui, sans-serif`) give the best platform-native rendering at the cost of visual consistency. Test your chosen fonts on both platforms during the design phase, not after launch. ### Web Font Loading Impact Font loading affects perceived rendering. Flash of unstyled text (FOUT) shows the fallback font briefly before the web font loads. Flash of invisible text (FOIT) shows no text until the font loads. Use `font-display: swap` for content and `font-display: optional` for decorative fonts to balance performance and visual stability. ### Markdown vs Rich Text: When to Use Each Format Compare Markdown and rich text editors for documentation, collaboration, and content publishing. - URL: https://peasytext.com/guides/markdown-vs-rich-text-format-comparison/ - Category: Comparison - Reading time: 2 min - Words: 316 Key takeaways: - Markdown uses plain text with minimal syntax characters to indicate formatting — bold, *italic*, # headings. - Markdown files are plain text — they work with version control (Git), are tiny in file size, and render consistently across any platform. - Rich text editors provide immediate visual feedback — what you see is what you get. - For technical documentation and developer guides: Markdown (version control, code blocks, portability). - Many modern tools support Markdown input with rich text preview — Notion, Typora, HackMD, and VS Code's Markdown preview. ## Two Philosophies of Text Formatting Markdown uses plain text with minimal syntax characters to indicate formatting — **bold**, *italic*, # headings. Rich text editors (like Google Docs, Word) provide WYSIWYG formatting with toolbar buttons. Each approach has fundamental strengths and weaknesses. ## Markdown Strengths Markdown files are plain text — they work with version control (Git), are tiny in file size, and render consistently across any platform. The syntax is fast to type — no reaching for toolbar buttons or keyboard shortcuts. Markdown is the standard for developer documentation, README files, and static site generators. It forces a content-first approach by limiting formatting options. ## Rich Text Strengths Rich text editors provide immediate visual feedback — what you see is what you get. They support complex layouts (columns, text wrapping around images), fine-grained formatting (specific font sizes, colors, spacing), and collaborative features (comments, suggestions, tracked changes). Non-technical users find rich text more intuitive. ## Use Case Mapping For technical documentation and developer guides: Markdown (version control, code blocks, portability). For business documents shared with non-technical stakeholders: rich text (familiar interface, formatting flexibility). For blog posts and content management: depends on the CMS (many support both). For notes and knowledge management: Markdown (tools like Obsidian, Notion, Bear). ## Hybrid Approaches Many modern tools support Markdown input with rich text preview — Notion, Typora, HackMD, and VS Code's Markdown preview. This gives the speed of Markdown typing with the visual clarity of rich text. Some CMSs accept Markdown but render it as HTML with full styling. Consider tools that let you switch between modes depending on the task. ## Conversion Between Formats Pandoc is the Swiss Army knife of document conversion — it converts between Markdown, DOCX, PDF, HTML, LaTeX, and dozens of other formats. For one-off conversions, online tools work … ### Markdown Editors and Renderers Compared Compare Markdown editors, live preview tools, and rendering differences across platforms. - URL: https://peasytext.com/guides/markdown-editors-renderers-compared/ - Category: Comparison - Reading time: 1 min - Words: 272 ## Markdown Editor Comparison Markdown editors range from plain text files in any editor to dedicated applications with live preview, collaboration, and publishing features. The right choice depends on your writing workflow and output needs. ### Plain Text Editors Any text editor can write Markdown: VS Code, Sublime Text, Vim. The advantage is speed, keyboard-driven workflow, and using the same editor for code and prose. Extensions add preview panels, syntax highlighting, and table formatting. Best for developers who want a single tool for everything. ### Dedicated Markdown Editors Tools like Typora, Obsidian, and iA Writer provide distraction-free writing environments optimized for prose. Features include live rendering (see formatted output as you type), focus mode (dim everything except the current paragraph), and document organization. Best for writers who produce long-form content regularly. ### Web-Based Editors Browser-based Markdown editors require no installation and work on any device. Some offer real-time collaboration (multiple editors simultaneously). They typically support standard GitHub-Flavored Markdown with previews. Best for quick notes, documentation collaboration, and access from multiple devices. ### Rendering Differences Markdown rendering varies between implementations. GitHub-Flavored Markdown (GFM) adds tables, task lists, strikethrough, and autolinks. CommonMark is the standardization effort — most modern parsers follow it. Some features are non-standard: footnotes, definition lists, math blocks, and Mermaid diagrams. Test your Markdown in the target rendering environment. ### Choosing Based on Output For GitHub READMEs: any editor with GFM preview. For blogs: an editor that matches your publishing platform's Markdown flavor. For personal notes: Obsidian or similar tools with local storage and search. For documentation: tools with table of contents generation, cross-referencing, and multiple output formats (HTML, PDF, DOCX). ### Advanced Regex Patterns for Log File Analysis Log files contain critical diagnostic information buried in semi-structured text. Master regex patterns to extract timestamps, error codes, IP addresses, and stack traces. - URL: https://peasytext.com/guides/advanced-regex-log-analysis/ - Category: How-To - Reading time: 1 min - Words: 208 ## Log File Structure Most log files follow a predictable pattern: timestamp, severity level, component name, and message. However, multi-line entries (stack traces, JSON payloads) and inconsistent formatting across different services make automated extraction challenging. ### Essential Patterns Timestamp extraction handles multiple formats: - ISO 8601: `\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})` - Common Log Format: `\d{2}/\w{3}/\d{4}:\d{2}:\d{2}:\d{2} [+-]\d{4}` - Syslog: `\w{3}\s+\d{1,2} \d{2}:\d{2}:\d{2}` IP address matching uses: `\b(?:\d{1,3}\.){3}\d{1,3}\b` for IPv4. For IPv6, the pattern is considerably more complex due to abbreviation rules. ### Error Pattern Extraction Match error codes and their context using capturing groups. For HTTP status codes: `HTTP/\d\.\d"\s+(\d{3})\s+`. For stack traces, match the exception line first, then greedily capture indented lines below it. ### Performance Tips Anchor your patterns where possible — `^` for line starts and `$` for line ends dramatically improve matching speed in large files. Avoid catastrophic backtracking by using possessive quantifiers or atomic groups when nesting quantifiers. Test your patterns against a sample of your actual log data before running against gigabytes of production logs. ### Building a Log Analysis Workflow Chain multiple regex operations: first filter by severity level, then extract timestamps and messages from matching lines, and finally aggregate by error type or time window. This layered approach is more maintainable than a single monolithic pattern. ### AI Text Generator Comparison: GPT vs Claude vs Gemini Compare leading AI text generators by capability, accuracy, and best use cases. - URL: https://peasytext.com/guides/ai-text-generators-gpt-claude-gemini-comparison/ - Category: Comparison - Reading time: 1 min - Words: 260 Key takeaways: - Large language models have transformed content creation, coding assistance, and information synthesis. - GPT-4 and its variants excel at creative writing, code generation, and general-purpose tasks. - Claude focuses on safety, accuracy, and nuanced understanding. - Gemini integrates deeply with Google's search and knowledge infrastructure. - For one-off creative tasks, any model works well — try your preferred interface. ## The AI Text Generation Landscape Large language models have transformed content creation, coding assistance, and information synthesis. The three leading models — OpenAI's GPT, Anthropic's Claude, and Google's Gemini — each have distinct strengths. Understanding their differences helps you choose the right tool for specific tasks. ## GPT (OpenAI) GPT-4 and its variants excel at creative writing, code generation, and general-purpose tasks. The ChatGPT interface is the most widely adopted. Strengths include broad knowledge, strong coding ability, image understanding (GPT-4V), and extensive plugin/tool ecosystem. Best for: creative content, coding assistance, and tasks requiring tool integration. ## Claude (Anthropic) Claude focuses on safety, accuracy, and nuanced understanding. It handles long documents exceptionally well with large context windows. Claude excels at careful analysis, following complex instructions, and maintaining consistency across long conversations. Best for: document analysis, careful reasoning tasks, technical writing, and conversations requiring nuanced understanding. ## Gemini (Google) Gemini integrates deeply with Google's search and knowledge infrastructure. It handles multimodal inputs (text, images, video) natively. Gemini Ultra performs competitively on benchmarks while offering integration with Google Workspace tools. Best for: tasks requiring current information, multimodal understanding, and Google ecosystem integration. ## Practical Selection Guide For one-off creative tasks, any model works well — try your preferred interface. For code generation, GPT and Claude both excel. For analyzing long documents (50+ pages), Claude's extended context is advantageous. For tasks requiring real-time information, Gemini's search integration helps. For privacy-sensitive tasks, consider which provider's data policies align with your requirements. Most professionals use multiple models, choosing based on the specific task at hand. ### Solving Text Encoding Issues Across Platforms Fix character corruption (mojibake) when text appears garbled due to encoding mismatches. - URL: https://peasytext.com/guides/solving-text-encoding-issues-across-platforms/ - Category: Troubleshooting - Reading time: 1 min - Words: 249 Key takeaways: - Mojibake is garbled text that appears when text is decoded with the wrong character encoding. - ASCII covers 128 characters (English letters, digits, basic symbols) using 7 bits. - Windows applications often default to Windows-1252 (similar to Latin-1). - Look at the corruption pattern. - Set UTF-8 everywhere: database charset (utf8mb4 in MySQL, UTF8 in PostgreSQL), file encoding in your editor, HTTP Content-Type headers (charset=utf-8), HTML meta charset tag, and programming language string handling. ## What Is Mojibake Mojibake is garbled text that appears when text is decoded with the wrong character encoding. For example, the word "café" stored as UTF-8 but read as Latin-1 becomes "café." This happens because different encodings use different byte sequences for the same character. ## Understanding Character Encodings ASCII covers 128 characters (English letters, digits, basic symbols) using 7 bits. Latin-1 (ISO 8859-1) extends ASCII to 256 characters, covering Western European languages. UTF-8 uses 1-4 bytes per character and covers all Unicode characters (150,000+). UTF-8 is backward-compatible with ASCII — plain English text looks identical in both. ## Common Encoding Mismatches Windows applications often default to Windows-1252 (similar to Latin-1). Mac and Linux default to UTF-8. Excel opens CSV files using the system's default encoding. Databases may use latin1 when they should use utf8mb4. Copy-pasting between applications can introduce encoding changes. ## Diagnosis Steps Look at the corruption pattern. "é" replacing "é" means UTF-8 data read as Latin-1. "?" or "□" replacing characters means the font or encoding lacks those characters. "é" (double mojibake) means UTF-8 was decoded, re-encoded as Latin-1, then decoded as UTF-8 again. ## Prevention Strategy Set UTF-8 everywhere: database charset (utf8mb4 in MySQL, UTF8 in PostgreSQL), file encoding in your editor, HTTP Content-Type headers (charset=utf-8), HTML meta charset tag, and programming language string handling. When receiving external data, detect the encoding using libraries like chardet (Python) or jschardet (JavaScript) before processing. Always explicitly specify encoding when reading files rather than relying on defaults. ### Unicode Normalization: NFC, NFD, NFKC, NFKD Explained The same visible character can have multiple Unicode representations. Learn when and how to normalize text to prevent comparison failures and search issues. - URL: https://peasytext.com/guides/unicode-normalization-forms-explained/ - Category: Best Practice - Reading time: 1 min - Words: 249 ## The Normalization Problem Unicode allows the same visual character to be represented in multiple ways. The letter "e" (e-acute) can be a single code point (U+00E9) or a combination of "e" (U+0065) + combining acute accent (U+0301). These look identical but fail string comparison. ### The Four Normalization Forms NFC (Canonical Decomposition, followed by Canonical Composition) composes characters where possible. This is the most common web standard and what most applications expect. NFD (Canonical Decomposition) decomposes composed characters into base characters plus combining marks. NFKC and NFKD additionally handle compatibility equivalences — for example, converting the Roman numeral "IV" (single character) to separate "I" and "V" characters. ### When to Normalize Normalize text at system boundaries: when receiving user input, importing data, and before storing in a database. Use NFC for web content (W3C recommendation), database storage, and general-purpose text. Use NFKC for search indexing and string comparison where visual similarity matters more than semantic precision. ### Real-World Impact Without normalization, a search for "cafe" won't match "cafe" if one uses NFC and the other NFD encoding of the accent. File names with accented characters can create "duplicate" files that differ only in normalization form. URLs containing Unicode characters must be normalized to prevent routing failures. ### Platform Differences macOS file systems use NFD normalization, while Windows uses NFC. This means copying files between operating systems can change filename byte sequences. Linux file systems are normalization-agnostic, which can result in visually identical filenames coexisting in the same directory. ### Troubleshooting CSS Z-Index Stacking Issues Z-index doesn't always work as expected because of stacking contexts. Learn how stacking contexts are created, how they affect z-index, and how to debug layering issues. - URL: https://peasytext.com/guides/troubleshooting-css-z-index-stacking/ - Category: Troubleshooting - Reading time: 1 min - Words: 251 ## The Z-Index Mental Model Z-index only works on positioned elements (position: relative/absolute/fixed/sticky) and flex/grid children. More importantly, z-index creates a stacking context — a self-contained layer that contains all of its children. Children cannot escape their parent's stacking context, no matter how high their z-index. ### What Creates a Stacking Context Beyond positioned elements with z-index, these CSS properties create new stacking contexts: opacity less than 1, transform (any value), filter, backdrop-filter, perspective, clip-path, will-change, contain (layout or paint), and isolation: isolate. This means a seemingly unrelated property like `opacity: 0.99` can break your carefully planned z-index hierarchy. ### Debugging Steps First, identify which stacking contexts exist. In Chrome DevTools, the Layers panel shows 3D stacking contexts. Check if your element's parent has any of the stacking-context-creating properties. Remember: a child element with z-index: 9999 inside a parent with z-index: 1 will still be below a sibling element with z-index: 2. ### Common Patterns and Fixes For overlapping modals and dropdowns, use a single stacking context at the body level for all overlays. For header/sticky elements overlapping content, ensure the header's stacking context contains an appropriate z-index relative to the main content area. Use CSS custom properties to manage z-index values systematically: ```css :root { --z-dropdown: 100; --z-sticky: 200; --z-modal: 300; --z-toast: 400; } ``` ### The Isolation Property `isolation: isolate` creates a new stacking context without requiring z-index or transform. Use it intentionally to contain component z-index values within their own context, preventing them from interfering with other components. ### Text Diff and Merge Tools Compared Compare text comparison tools for code review, document editing, and content management. - URL: https://peasytext.com/guides/text-diff-merge-tools-compared/ - Category: Comparison - Reading time: 1 min - Words: 237 Key takeaways: - Comparing text versions is fundamental to software development (code review), content management (document revisions), and quality assurance (translation verification). - Line-level diff (traditional) highlights entire changed lines but doesn't show which specific words changed within a line. - Git diff is the standard for version-controlled files. - VS Code's built-in diff viewer handles most development needs. - When two people edit the same file independently, three-way merge compares both versions against the common ancestor to identify non-conflicting changes (automatically mergeable) and conflicts (requiring human decision). ## Why Text Diff Tools Matter Comparing text versions is fundamental to software development (code review), content management (document revisions), and quality assurance (translation verification). The right diff tool saves hours of manual comparison and catches changes that human eyes miss. ## Character-Level vs Line-Level Diff Line-level diff (traditional) highlights entire changed lines but doesn't show which specific words changed within a line. Character-level diff highlights the exact characters that changed — much more useful for code review and document editing. Word-level diff is a middle ground that's ideal for prose where character-level changes are too granular. ## Command-Line Tools Git diff is the standard for version-controlled files. diff (Unix) handles basic file comparison. colordiff adds syntax highlighting. delta and diff-so-fancy improve Git diff output. For structured data, specialized tools exist: jq for JSON diff, xmldiff for XML, and daff for CSV comparison. ## GUI and Web Tools VS Code's built-in diff viewer handles most development needs. Beyond Compare (paid) offers three-way merge and folder comparison. Meld (free, Linux/Mac) provides clean side-by-side comparison. For one-off comparisons, online tools provide immediate results without installation. Web-based tools process text client-side for privacy. ## Three-Way Merge When two people edit the same file independently, three-way merge compares both versions against the common ancestor to identify non-conflicting changes (automatically mergeable) and conflicts (requiring human decision). Git uses this automatically. Understanding three-way merge helps you resolve merge conflicts more confidently and correctly. ### Troubleshooting Text Truncation and Overflow Text that displays correctly in English often breaks in other languages due to word length, character width, and directional differences. Learn how to identify and fix these issues. - URL: https://peasytext.com/guides/troubleshooting-text-truncation-overflow/ - Category: Troubleshooting - Reading time: 1 min - Words: 218 ## Why Text Overflows German compound words can be 30+ characters long. Japanese text has no spaces for word wrapping. Arabic text flows right-to-left. Numbers formatted with thousands separators vary by locale. Any fixed-width container designed for English text will eventually overflow when exposed to real multilingual content. ### Common Symptoms Buttons with truncated labels, table columns with clipped data, navigation items that wrap to multiple lines, and form fields that can't display their full content. These issues often go unnoticed during English-only testing and surface only after localization. ### Diagnosis Steps Test with the longest strings your application will encounter. German and Finnish produce the longest European text. For CJK languages, test with full-width characters that are double the width of Latin characters. Use browser developer tools to toggle text-overflow, check computed widths, and simulate different viewport sizes. ### CSS Solutions Use `overflow-wrap: break-word` (not `word-break: break-all`, which breaks English words mid-syllable) for container overflow. Apply `text-overflow: ellipsis` with `overflow: hidden` and `white-space: nowrap` for single-line truncation. For multi-line truncation, use `-webkit-line-clamp` with a fallback max-height. ### Prevention Strategies Design containers with flexible widths using min-width and max-width rather than fixed widths. Allow 30-40% extra space for translated content. Test with pseudolocalization — tools that expand English strings by 30-50% and add accented characters to simulate translation. ### Lorem Ipsum Alternatives: Better Placeholder Text Compare placeholder text options beyond Lorem Ipsum for more realistic and useful design mockups. - URL: https://peasytext.com/guides/lorem-ipsum-alternatives-placeholder-text/ - Category: Comparison - Reading time: 1 min - Words: 263 Key takeaways: - Lorem Ipsum has been the standard placeholder text since the 1500s, but it has significant drawbacks for modern design work. - The best placeholder is real content. - When designing for specific languages, use placeholder text in that language. - For data-heavy interfaces (dashboards, tables, lists), random text is less useful than structured fake data. - Always indicate placeholder text is temporary — use a different color or add a watermark. ## Beyond Lorem Ipsum Lorem Ipsum has been the standard placeholder text since the 1500s, but it has significant drawbacks for modern design work. Its Latin-based character distribution doesn't match English (or any modern language), leading to inaccurate line length estimates. Clients sometimes think it's real content and approve layouts without reviewing actual copy. ## Real Content First The best placeholder is real content. Even draft copy gives a more accurate representation of the final design. If real content isn't available, use content from a similar context — a competitor's page, an industry article, or previous project copy. This reveals layout issues that Lorem Ipsum masks. ## Language-Specific Placeholders When designing for specific languages, use placeholder text in that language. Japanese, Arabic, and CJK languages have fundamentally different character widths and line-breaking rules. German text tends to be 30% longer than English equivalents. Russian uses wider Cyrillic characters. Using Latin placeholder text for these languages leads to layouts that break with real content. ## Structured Placeholder Data For data-heavy interfaces (dashboards, tables, lists), random text is less useful than structured fake data. Generate realistic names, dates, currency amounts, and status values. This reveals column width issues, number formatting problems, and alignment concerns that Lorem Ipsum cannot. ## Best Practices Always indicate placeholder text is temporary — use a different color or add a watermark. Set minimum and maximum content lengths to test both extremes. Include edge cases in placeholders: very long words, empty states, single-character entries, and special characters. Document the expected content type and length for each placeholder area to guide copywriters. ### Web Fonts Loading Strategy for Fast Page Rendering Web fonts can delay text rendering by seconds. Learn the optimal loading strategy to balance visual quality with performance using preload, font-display, and fallback stacks. - URL: https://peasytext.com/guides/web-fonts-loading-strategy-fast-rendering/ - Category: Best Practice - Reading time: 2 min - Words: 326 Key takeaways: - When a page uses a web font, the browser must download the font file before rendering text. - ### Preloading Critical Fonts Use `<link rel="preload">` for your most important font files (typically regular weight body text): ```html <link rel="preload" href="/fonts/inter-var. - Only preload 1-2 critical font files — preloading everything defeats the purpose. - ## The Web Font Problem When a page uses a web font, the browser must download the font file before rendering text. - Best for body text — text is always readable. ## The Web Font Problem When a page uses a web font, the browser must download the font file before rendering text. During this download, text is either invisible (FOIT — Flash of Invisible Text) or displayed in a fallback font and then swaps (FOUT — Flash of Unstyled Text). Both degrade user experience. ### font-display Values The `font-display` CSS descriptor controls browser behavior during font loading: - `swap`: Show fallback immediately, swap to web font when loaded. Best for body text — text is always readable. - `optional`: Show fallback immediately, swap only if font loads very quickly (~100ms). Best for decorative fonts — avoids layout shift on slow connections. - `fallback`: Brief invisible period (100ms), then fallback, then swap within 3 seconds. - `block`: Invisible for up to 3 seconds, then fallback. Only use for icon fonts. ### Preloading Critical Fonts Use `<link rel="preload">` for your most important font files (typically regular weight body text): ```html <link rel="preload" href="/fonts/inter-var.woff2" as="font" type="font/woff2" crossorigin> ``` Preloading starts the download immediately rather than waiting for CSS parsing. Only preload 1-2 critical font files — preloading everything defeats the purpose. ### Subset and Optimize Most web fonts include thousands of characters you'll never use. Subsetting reduces a 200KB font to 20KB by including only the characters your site needs. Use `unicode-range` in @font-face to load language-specific subsets on demand. Always serve WOFF2 format — it's 30% smaller than WOFF. ### The Fallback Stack Choose fallback fonts that closely match your web font's metrics (x-height, width, weight) to minimize layout shift during swap. Tools like Fontaine and @next/font automatically generate size-adjusted fallback fonts. A good fallback stack: `"Inter", "Inter Fallback", system-ui, -apple-system, sans-serif`. ### Performance Budget Aim for under 100KB total web font download. Each font weight and style is a separate file … ### Regular Expressions: Pattern Matching Essentials Master fundamental regex patterns for text search, validation, and transformation tasks. - URL: https://peasytext.com/guides/regular-expressions-pattern-matching-essentials/ - Category: How-To - Reading time: 1 min - Words: 223 Key takeaways: - Regular expressions (regex) are pattern descriptions for matching text. - Character classes: [a-z] matches any lowercase letter, [0-9] any digit, [A-Za-z0-9_] any word character (shorthand: \w). - Email validation: ^[\w.+-]+@[\w-]+\.[a-zA-Z]{2,}$ (simplified). - Parentheses create capture groups: (\d{4})-(\d{2})-(\d{2}) captures year, month, day separately. - Build patterns incrementally — start simple and add complexity. ## Why Regular Expressions Regular expressions (regex) are pattern descriptions for matching text. They're used in every programming language, text editor, and command-line tool for search, validation, and transformation. A single regex pattern can replace dozens of lines of string manipulation code. ## Essential Patterns Character classes: [a-z] matches any lowercase letter, [0-9] any digit, [A-Za-z0-9_] any word character (shorthand: \w). Quantifiers: * (zero or more), + (one or more), ? (zero or one), {3} (exactly 3), {2,5} (2 to 5). Anchors: ^ (start of line), $ (end of line), \b (word boundary). ## Common Use Cases Email validation: ^[\w.+-]+@[\w-]+\.[a-zA-Z]{2,}$ (simplified). Phone numbers: \+?\d{1,3}[-.\s]?\(?\d{1,4}\)?[-.\s]?\d{1,4}[-.\s]?\d{1,9}. IP addresses: \b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b. URLs: https?://[\w\-]+(\.[\w\-]+)+[/\w\-.?=&#%]*. Note: production validation should use dedicated parsers, not regex alone. ## Groups and Backreferences Parentheses create capture groups: (\d{4})-(\d{2})-(\d{2}) captures year, month, day separately. Backreferences (\1, \2) refer to captured groups in replacement patterns. Named groups (?P<year>\d{4}) make patterns self-documenting. Non-capturing groups (?:...) group without capturing (better performance). ## Debugging Regex Build patterns incrementally — start simple and add complexity. Use online regex testers (regex101.com) that explain each part of your pattern and highlight matches in real-time. Watch for greedy vs lazy quantifiers: .* matches as much as possible (greedy), .*? matches as little as possible (lazy). Test with edge cases: empty strings, very long strings, special characters, and strings that should NOT match. ### How to Redact Sensitive Information in PDFs Permanently remove confidential text, images, and metadata from PDF documents before sharing. - URL: https://peasytext.com/guides/how-to-redact-sensitive-info-pdfs/ - Category: How-To - Reading time: 2 min - Words: 311 ## PDF Redaction Redaction permanently removes sensitive content from PDFs. Unlike placing a black rectangle over text (which is cosmetic — the text remains selectable underneath), proper redaction deletes the underlying data. ### The Difference Between Covering and Redacting Drawing a black box over text in a PDF editor only hides the content visually. The text remains in the file and can be extracted by copying, searching, or using PDF parsing tools. Actual redaction replaces the text with a blank area and removes the character data from the file's content stream. Several high-profile data leaks have resulted from cosmetic redaction rather than actual redaction. ### Redaction Process Mark areas for redaction (text passages, images, form field data), then apply the redactions in a separate step. This two-step process lets you review marks before committing — redaction is irreversible. After applying, verify the redaction by searching for the original text and by examining the file with a PDF text extraction tool. ### Metadata Redaction PDF files contain metadata beyond the visible content: author name, creation date, revision history, comments, hidden annotations, and embedded file attachments. Use a metadata sanitization step after content redaction. Some PDFs also contain thumbnail images that may show pre-redacted content. ### Browser-Based Redaction Tools Client-side PDF redaction tools process the document entirely in your browser. Upload the PDF, mark areas for redaction, apply, and download the result. Since the file never leaves your device, this is suitable for confidential documents. Verify the output by attempting to select text in the redacted areas — properly redacted content should not be selectable. ### Legal and Compliance Requirements GDPR right-to-erasure requests may require redacting personal data from stored PDFs. FOIA (Freedom of Information Act) responses use redaction extensively. Court documents require certified redaction processes. In regulated industries, document your redaction … ### Markdown for Technical Documentation Markdown has become the standard for technical documentation. Learn the extended syntax, tooling, and best practices for writing clear, maintainable technical docs. - URL: https://peasytext.com/guides/markdown-technical-documentation-guide/ - Category: Best Practice - Reading time: 2 min - Words: 308 Key takeaways: - Markdown combines readability with structure. - ### Essential Syntax Beyond Basics Fenced code blocks with language specification enable syntax highlighting: use triple backticks followed by the language name. - Start each section with the most important information. ## Why Markdown for Documentation Markdown combines readability with structure. Unlike HTML, Markdown source files are pleasant to read raw. Unlike Word, Markdown files work with version control (git diff shows meaningful changes). The format is supported by GitHub, GitLab, Notion, Confluence, and most documentation platforms. ### Essential Syntax Beyond Basics Fenced code blocks with language specification enable syntax highlighting: use triple backticks followed by the language name. Tables use pipe characters with a header separator row. Task lists use `- [ ]` for unchecked and `- [x]` for checked items. Footnotes use `[^1]` references. Admonitions (callout boxes) are supported by most documentation tools using `:::` or `>` syntax. ### Documentation Structure Start with a clear title and one-paragraph summary of what the document covers. Include a table of contents for documents longer than three sections. Use heading levels consistently (H2 for major sections, H3 for subsections). Include code examples for every API or configuration option. End with a "Related" or "Next Steps" section linking to other relevant documents. ### Writing for Developers Be direct — developers scan documentation for specific answers. Start each section with the most important information. Use code examples liberally — developers trust code more than prose. Include the expected output alongside code examples. Document error cases and edge cases, not just the happy path. ### Tooling Recommendations Use a Markdown linter (markdownlint) to enforce consistent formatting. Preview rendered output in your editor. Use link checkers to find broken references. Consider a documentation site generator (MkDocs, Docusaurus, VitePress) for larger documentation sets — they add navigation, search, and versioning. ### Common Mistakes Don't use Markdown features inconsistently (mixing ATX and Setext headings, mixing ordered and unordered lists for the same purpose). Don't create deeply nested headings (H4+ should be rare). Don't use HTML in Markdown unless … ### How to Redact Sensitive Information in PDFs Properly redacting PDFs requires more than black rectangles over text. Learn the correct techniques to permanently remove sensitive data from PDF documents. - URL: https://peasytext.com/guides/how-to-redact-sensitive-info-pdf/ - Category: How-To - Reading time: 1 min - Words: 221 ## Why Proper Redaction Matters Simply drawing a black box over sensitive text does not remove it from the PDF. The underlying text remains in the file and can be extracted by anyone with a PDF editor or command-line tools. True redaction permanently removes the data from the document. ### Common Redaction Mistakes The most frequent mistake is using annotation tools to overlay text with black rectangles. This hides content visually but leaves it fully intact in the PDF data layer. Copy-pasting from the document or using a text extraction tool will reveal the "redacted" content. Another common error is using image editors to black out content in a screenshot — the original PDF remains unmodified. ### Proper Redaction Process First, mark the areas to be redacted using a dedicated redaction tool. Review all marked areas carefully, checking both text and images. Then apply the redactions, which permanently removes the underlying content. Finally, remove hidden metadata — document properties, comments, form fields, JavaScript, and embedded files may also contain sensitive information. ### Verification Steps After redaction, verify the result by searching the PDF for redacted terms, extracting all text with a command-line tool, and examining the file size (it should be smaller after removing content). Open the redacted PDF in a different viewer to confirm the redactions appear correctly across applications. ### How to Convert Scanned PDFs to Searchable Text Scanned PDFs are essentially images trapped in a PDF container. OCR technology can add a searchable text layer while preserving the original scanned appearance. - URL: https://peasytext.com/guides/how-to-convert-scanned-pdf-searchable/ - Category: How-To - Reading time: 1 min - Words: 247 ## Understanding Scanned PDFs When you scan a physical document, the scanner captures an image of each page. A PDF viewer displays these images but cannot search, copy, or index the text because no actual text data exists — only pixels representing text shapes. ### How OCR Works Optical Character Recognition analyzes the image to identify character shapes, then maps them to actual text characters. Modern OCR engines use machine learning models trained on millions of document images, achieving accuracy rates above 99% for clean, well-formatted documents. ### Factors Affecting OCR Accuracy Scan resolution matters most — 300 DPI is the minimum for reliable OCR, and 600 DPI is recommended for small text or complex layouts. Document quality affects results significantly: skewed pages, coffee stains, faded ink, and low contrast all reduce accuracy. Font choice also matters — standard fonts like Times New Roman and Arial are recognized easily, while decorative or handwritten fonts produce more errors. ### Post-OCR Cleanup OCR output often requires cleanup. Common errors include confusing similar characters (0 vs O, 1 vs l vs I), misinterpreting ligatures, and struggling with tables and multi-column layouts. Run spell-check on the extracted text and spot-check numbers and proper nouns. For legal or medical documents, manual verification of the OCR layer is essential. ### Sandwiched PDFs The best approach creates a "sandwiched" PDF that overlays invisible text on top of the original scanned image. This preserves the exact visual appearance while adding searchability, copy-paste, and accessibility features. ### Encoding Explained: UTF-8, ASCII, Base64, and URL Encoding Understand character encodings, binary-to-text encoding, and URL encoding to prevent data corruption and bugs. - URL: https://peasytext.com/guides/encoding-explained-utf8-ascii-base64-url/ - Category: How-To - Reading time: 2 min - Words: 310 ## Text and Data Encoding Encoding confusion causes garbled text, broken URLs, corrupted data, and security vulnerabilities. Understanding the purpose of each encoding type prevents these issues. ### Character Encoding: ASCII and UTF-8 ASCII maps 128 characters (English letters, digits, punctuation) to numbers 0-127, using 7 bits per character. UTF-8 extends this to support every Unicode character (148,000+) using 1-4 bytes. ASCII text is valid UTF-8. The reverse is not true — UTF-8 text containing non-ASCII characters is not valid ASCII. Always use UTF-8 for new projects. ### UTF-8 vs UTF-16 vs UTF-32 UTF-8 uses variable-width encoding (1-4 bytes): efficient for ASCII-heavy text (English), less so for CJK characters (3 bytes each). UTF-16 uses 2 or 4 bytes: efficient for CJK text, wasteful for ASCII. UTF-32 uses exactly 4 bytes per character: simplest to process but wasteful of space. Web standard: UTF-8. Windows internals: UTF-16. Database analysis: UTF-32. ### Base64 Encoding Base64 converts binary data to ASCII text using 64 characters (A-Z, a-z, 0-9, +, /). It's used to embed binary data in text-only contexts: email attachments (MIME), data URIs in HTML/CSS, and JWT payloads. Base64 increases data size by approximately 33%. Base64url variant replaces + with - and / with _ for URL safety. ### URL Encoding (Percent Encoding) Special characters in URLs are encoded as %XX where XX is the hex value: space becomes %20, & becomes %26. This prevents special characters from being interpreted as URL syntax. Over-encoding (encoding characters that don't need it) is harmless but makes URLs ugly. Under-encoding causes parsing errors and potential security issues. ### Common Encoding Bugs Mojibake (garbled text) means the encoding was misidentified — UTF-8 bytes interpreted as Latin-1, or vice versa. Double encoding (%2520 instead of %20) means the data was URL-encoded twice. Base64 "padding" errors (invalid length, missing … ### PDF Form Creation and Interactive Fields Create fillable PDF forms with text fields, checkboxes, dropdowns, and validation rules. - URL: https://peasytext.com/guides/pdf-form-creation-interactive-fields/ - Category: How-To - Reading time: 1 min - Words: 263 Key takeaways: - PDF forms combine the fixed layout of PDF with interactive form elements. - Text fields for free-form input (single line and multiline). - Add validation to prevent submission errors. - Every form field needs a tooltip (used by screen readers). - Distribute forms via email, web download, or document management systems. ## Why PDF Forms PDF forms combine the fixed layout of PDF with interactive form elements. They work offline, maintain formatting across devices, can be digitally signed, and integrate with document management systems. For government forms, contracts, and applications, fillable PDFs remain the standard. ## Available Form Fields Text fields for free-form input (single line and multiline). Checkboxes for multiple selections. Radio buttons for single selection from options. Dropdown menus for long option lists. Date fields with calendar pickers. Signature fields for digital signatures. Buttons for form actions (submit, reset, print). Each field type has properties including name, tooltip, default value, and formatting. ## Field Validation Add validation to prevent submission errors. Required fields prevent blank submissions. Format validation ensures emails, phone numbers, and dates match expected patterns. Range validation constrains numeric inputs. Custom JavaScript validation handles complex rules like cross-field dependencies. Show clear error messages when validation fails. ## Accessibility Requirements Every form field needs a tooltip (used by screen readers). Tab order should follow the visual layout logically. Use proper field labels — not just visual text near the field. Provide instructions at the form level and field level. Test with screen readers (NVDA, VoiceOver) to verify the form is usable without visual context. ## Distribution and Collection Distribute forms via email, web download, or document management systems. Collect responses via email submission (built-in PDF feature), web submission (PDF action URL), or print-and-scan workflows. For large-scale data collection, extract form data programmatically using tools like PDFtk or PyPDF2. Consider whether a web form would be more appropriate for your use case. ### Diff Algorithms: Understanding How Text Comparison Works Text comparison tools use sophisticated algorithms to detect additions, deletions, and modifications between two documents. Learn how Myers, patience, and histogram diff algorithms work. - URL: https://peasytext.com/guides/diff-algorithms-text-comparison/ - Category: Comparison - Reading time: 1 min - Words: 249 ## Why Diff Algorithms Matter Comparing two versions of a file seems straightforward until you try to implement it. The naive approach of comparing line-by-line breaks when lines are inserted or removed, shifting all subsequent lines. Diff algorithms solve this by finding the longest common subsequence between two texts. ### Myers Algorithm The default algorithm in Git, Myers diff finds the shortest edit script (minimum number of insertions and deletions) to transform one text into another. It works by exploring a graph of possible edits, expanding outward from both endpoints until the paths meet. Myers produces minimal diffs but can sometimes create confusing results when large blocks of text are moved. ### Patience Diff Patience diff first identifies unique lines that appear exactly once in both versions, using these as anchors. It then recursively applies the algorithm to the gaps between anchors. This produces more human-readable diffs, especially when functions or blocks are reordered. Git supports it via `git diff --patience`. ### Histogram Diff An optimization of patience diff that also handles non-unique lines efficiently. It builds a histogram of line frequencies and uses low-frequency lines as anchors. This is often the best general-purpose choice and can be enabled in Git with `git diff --histogram`. ### Practical Applications Beyond version control, diff algorithms power document comparison tools, database migration generators, configuration management, and collaborative editing. Understanding how they work helps you interpret their output — when a diff shows a confusing result, switching algorithms often produces a clearer view. ### Pinterest Pin Design: Visual Best Practices for Click-Through Pinterest is a visual search engine where pin design directly determines click-through rate. Optimal aspect ratios, text overlay techniques, and color choices can double engagement compared to generic image sharing. - URL: https://peasytext.com/guides/pinterest-pin-design-best-practices/ - Category: Best Practice - Reading time: 2 min - Words: 315 Key takeaways: - Unlike other social platforms driven by social graphs, Pinterest operates primarily as a visual discovery and search engine. - The optimal pin aspect ratio is 2:3 (1000×1500 pixels). - Pins with text overlays receive 2-3x more saves than image-only pins. - Red and orange tones consistently outperform blue and green in Pinterest engagement studies. - The pin title (up to 100 characters) is your primary SEO field. ## Pinterest as a Search Engine Unlike other social platforms driven by social graphs, Pinterest operates primarily as a visual discovery and search engine. Users come with intent — they are searching for ideas, products, and inspiration. This means pin design must communicate value at a glance, much like a search result snippet. ## Pin Specifications The optimal pin aspect ratio is 2:3 (1000×1500 pixels). Pins taller than 2:3 get truncated in the feed, hiding the bottom portion. Square pins (1:1) receive less real estate in the feed and underperform by roughly 30%. Use high-resolution images — Pinterest recommends a minimum width of 600 pixels. ## Text Overlay Strategy Pins with text overlays receive 2-3x more saves than image-only pins. The text should be large enough to read on a mobile device (minimum 24pt equivalent), using no more than 6-8 words. Place text in the top two-thirds of the pin — the bottom third is often obscured by the pin title in some views. Use high-contrast text: white text on a dark semi-transparent overlay, or dark text on a light background area. Avoid placing text directly over complex image areas where it becomes unreadable. ## Color and Visual Hierarchy Red and orange tones consistently outperform blue and green in Pinterest engagement studies. Warm colors create urgency and draw the eye in a feed filled with muted lifestyle photography. However, brand consistency should take priority over trend chasing. Multiple images in a single pin (collage style) can work for tutorials and before/after content. Limit collages to 2-4 images to avoid visual clutter at mobile sizes. ## Pin Titles and Descriptions The pin title (up to 100 characters) is your primary SEO field. Include the search keyword naturally — 'Easy 30-Minute Dinner Recipes for Beginners' outperforms 'My Favorite Meals.' The description (up … ### Spreadsheet Format Guide: XLSX, CSV, ODS, and TSV Compared Compare spreadsheet and tabular data formats across features, compatibility, and use cases. Understand when to use binary formats versus plain text, and how to handle common conversion issues. - URL: https://peasytext.com/guides/spreadsheet-format-xlsx-csv-ods-tsv-compared/ - Category: Comparison - Reading time: 1 min - Words: 296 Key takeaways: - Spreadsheet formats divide into binary (XLSX, ODS) and plain text (CSV, TSV). - CSV appears simple but hides numerous gotchas. - XLSX**: End-user reports with formatting, formulas, and charts - When converting XLSX to CSV, specify the encoding (UTF-8 with BOM for Excel compatibility), date format (ISO 8601), and decimal separator explicitly. - Fields containing commas must be quoted. ## Binary vs Plain Text Formats Spreadsheet formats divide into binary (XLSX, ODS) and plain text (CSV, TSV). Binary formats support formulas, formatting, charts, and multiple sheets but require specialized software. Plain text formats are universal but carry only raw data — no formulas, no formatting, no types. ## Format Comparison | Feature | XLSX | ODS | CSV | TSV | | --- | --- | --- | --- | --- | | Formulas | Yes | Yes | No | No | | Formatting | Yes | Yes | No | No | | Multiple sheets | Yes | Yes | No | No | | Data types | Yes | Yes | Strings only | Strings only | | File size | Medium | Medium | Small | Small | | Version control | Poor | Poor | Excellent | Excellent | | Universal readability | Excel required | LibreOffice | Any text editor | Any text editor | ## CSV Pitfalls CSV appears simple but hides numerous gotchas. Fields containing commas must be quoted. Quoted fields containing quotes must escape them by doubling. Line breaks within fields require quoting. Leading zeros in numeric fields (ZIP codes, phone numbers) are silently dropped by Excel. Encoding issues between UTF-8 and Windows-1252 corrupt international characters. ## When to Use Each - **XLSX**: End-user reports with formatting, formulas, and charts - **ODS**: Open format alternative when avoiding Microsoft lock-in matters - **CSV**: Data interchange between systems, database import/export - **TSV**: Data with embedded commas (addresses, descriptions) ## Conversion Best Practices When converting XLSX to CSV, specify the encoding (UTF-8 with BOM for Excel compatibility), date format (ISO 8601), and decimal separator explicitly. Convert spreadsheet formats with Peasy's browser-based converter to maintain data integrity without cloud uploads. ### Markup Language Formats: HTML, Markdown, reStructuredText, and AsciiDoc Compare lightweight markup languages for documentation, blogging, and technical writing. Understand the expressiveness, tooling support, and ideal use cases for each format. - URL: https://peasytext.com/guides/markup-formats-html-markdown-rst-asciidoc/ - Category: How-To - Reading time: 1 min - Words: 261 Key takeaways: - Markup languages span a spectrum from minimal (Markdown) to comprehensive (HTML). - Markdown dominates because of ecosystem support — GitHub, GitLab, VS Code, Notion, and thousands of tools understand it natively. - Markdown lacks built-in support for footnotes, definition lists, table spanning, and cross-referencing. - Markdown**: READMEs, blog posts, simple documentation ## The Markup Spectrum Markup languages span a spectrum from minimal (Markdown) to comprehensive (HTML). Lightweight markup languages sacrifice some expressiveness for readability — the source text is pleasant to read even without rendering. The right choice depends on your content complexity and tooling ecosystem. ## Feature Comparison | Feature | Markdown | reStructuredText | AsciiDoc | HTML | | --- | --- | --- | --- | --- | | Learning curve | Very low | Medium | Medium | High | | Tables | Basic | Complex supported | Complex supported | Full | | Cross-references | Extension | Built-in | Built-in | Manual | | Admonitions | Extension | Built-in | Built-in | Manual | | Math | Extension | Built-in (LaTeX) | Built-in | MathML | | Extensibility | Flavors vary | Directives | Macros | Unlimited | ## Markdown: The Universal Choice Markdown dominates because of ecosystem support — GitHub, GitLab, VS Code, Notion, and thousands of tools understand it natively. Its simplicity is both its strength and limitation. For basic documentation, README files, and blog posts, Markdown is the obvious choice. ## When Markdown Falls Short Markdown lacks built-in support for footnotes, definition lists, table spanning, and cross-referencing. Various 'flavors' (GFM, CommonMark, MDX) extend it inconsistently. For book-length technical documentation with complex structure, AsciiDoc or reStructuredText provides the features Markdown lacks. ## Choosing Your Format - **Markdown**: READMEs, blog posts, simple documentation - **reStructuredText**: Python project documentation (Sphinx) - **AsciiDoc**: Technical books, complex documentation with cross-references - **HTML**: When you need full control over presentation ### Browser Fingerprinting: How Websites Track You Without Cookies Discover how browser fingerprinting works, what data points websites collect, and practical countermeasures to reduce your trackability. Covers canvas fingerprinting, WebGL hashing, and audio context analysis. - URL: https://peasytext.com/guides/browser-fingerprinting-tracking-explained/ - Category: How-To - Reading time: 1 min - Words: 229 Key takeaways: - While cookies require user consent in many jurisdictions, browser fingerprinting operates silently. - Canvas fingerprinting renders invisible text or graphics, then reads the pixel data. - Research from the EFF's Panopticlick project showed that over 83% of browsers have a unique fingerprint. - Complete fingerprint resistance is extremely difficult, but you can reduce uniqueness significantly: ## Beyond Cookies While cookies require user consent in many jurisdictions, browser fingerprinting operates silently. Websites collect dozens of data points from your browser — screen resolution, installed fonts, WebGL renderer, timezone, language preferences, and hardware capabilities. Combined, these create a unique identifier that persists across sessions without storing anything on your device. ## Common Fingerprinting Techniques **Canvas fingerprinting** renders invisible text or graphics, then reads the pixel data. Subtle rendering differences between GPUs, font engines, and antialiasing algorithms produce a unique hash. **WebGL fingerprinting** queries the GPU model, vendor, and rendering quirks. **AudioContext fingerprinting** processes audio signals and compares the output — different hardware produces measurably different results. ## How Unique Are You? Research from the EFF's Panopticlick project showed that over 83% of browsers have a unique fingerprint. Even users who block cookies and use private browsing can be tracked. The more extensions, fonts, and customizations you have, the more distinctive your browser becomes. ## Countermeasures Complete fingerprint resistance is extremely difficult, but you can reduce uniqueness significantly: - Use Firefox with `privacy.resistFingerprinting` enabled - Tor Browser provides the strongest anti-fingerprinting protections - Avoid installing unusual browser extensions - Use standard screen resolutions and system fonts - Disable JavaScript on sites that do not require it Test your current fingerprint exposure with the Peasy browser fingerprint analyzer to see exactly which data points make your browser unique. ### Text Diff and Merge: Understanding Algorithms and Tools Understand how diff algorithms work, the differences between line-based and word-based diffs, and best practices for three-way merging. Essential knowledge for code review and collaborative editing. - URL: https://peasytext.com/guides/text-diff-merge-algorithms-tools/ - Category: How-To - Reading time: 1 min - Words: 263 Key takeaways: - Diff algorithms find the Longest Common Subsequence (LCS) between two texts, then report everything else as additions or deletions. - Three-way merge uses a common ancestor to resolve changes. - When conflicts occur, the merge tool marks both versions with conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`). - Keep changes small and focused to minimize conflicts ## How Diff Works Diff algorithms find the Longest Common Subsequence (LCS) between two texts, then report everything else as additions or deletions. The classic Myers algorithm runs in O(ND) time where N is the total text length and D is the number of differences. For similar texts (small D), this is nearly linear. ## Diff Granularity | Level | Compares | Best For | | --- | --- | --- | | Line-based | Whole lines | Source code, configuration | | Word-based | Individual words | Prose, documentation | | Character-based | Individual characters | Short strings, titles | | Semantic | Meaningful units | Code-aware refactoring | ## Three-Way Merge Three-way merge uses a common ancestor to resolve changes. When both sides modify different regions, the merge is automatic. When both sides modify the same region, a conflict occurs. The ancestor helps distinguish 'Alice changed this' from 'Bob changed this' — without it, all differences appear as potential conflicts. ## Merge Conflict Resolution When conflicts occur, the merge tool marks both versions with conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`). Resolution strategies include: - **Accept ours/theirs**: Choose one side entirely - **Manual edit**: Combine elements from both sides - **Re-implement**: Rewrite the section from scratch ## Best Practices - Keep changes small and focused to minimize conflicts - Rebase frequently against the main branch - Use semantic diff tools for code (AST-based diffing) - Review word-level diffs for prose and documentation Compare and merge texts with the Peasy diff tool — visualize changes at line, word, or character level with syntax highlighting. ### Search and Replace Power Techniques for Text Processing Advanced search and replace techniques using regex capture groups, lookaheads, and conditional replacements. Transform text data efficiently with patterns that handle complex real-world scenarios. - URL: https://peasytext.com/guides/search-replace-power-techniques/ - Category: How-To - Reading time: 1 min - Words: 212 Key takeaways: - Basic find-replace handles exact strings, but real-world text transformation requires pattern matching. - Capture groups `()` save matched portions for use in the replacement. - Lookaheads and lookbehinds match positions without consuming characters. - Some regex engines support conditional replacement — different output depending on which alternative matched. - For files under 10MB, client-side regex processing is instant. ## Beyond Simple Find-Replace Basic find-replace handles exact strings, but real-world text transformation requires pattern matching. Regex-powered search and replace can reformat dates, restructure CSV columns, rename variables, and transform data formats — tasks that would otherwise require custom scripts. ## Capture Groups for Restructuring Capture groups `()` save matched portions for use in the replacement. Number references (`$1`, `$2`) insert the captured text: - **Swap order**: Pattern `(\w+), (\w+)` → Replace `$2 $1` - Input: `Doe, John` → Output: `John Doe` - **Reformat dates**: Pattern `(\d{2})/(\d{2})/(\d{4})` → Replace `$3-$1-$2` - Input: `03/10/2026` → Output: `2026-03-10` ## Lookaheads and Lookbehinds Lookaheads and lookbehinds match positions without consuming characters. This enables surgical replacements that only affect text in specific contexts: - **Add commas to numbers**: Pattern `(?<=\d)(?=(\d{3})+$)` → Replace `,` - Input: `1000000` → Output: `1,000,000` ## Conditional Patterns Some regex engines support conditional replacement — different output depending on which alternative matched. This handles multi-format input in a single pass without writing multiple rules. ## Performance Considerations For files under 10MB, client-side regex processing is instant. Larger files may benefit from streaming line-by-line. Avoid patterns with catastrophic backtracking potential (`(a+)+b`) on untrusted input. Apply complex regex search and replace with the Peasy text tools — live preview shows results before committing changes. ### String Manipulation Best Practices for Developers Best practices for common string operations — trimming, padding, case conversion, truncation, and escaping. Covers Unicode-aware handling and the subtle bugs caused by naive string processing. - URL: https://peasytext.com/guides/string-manipulation-best-practices/ - Category: Best Practice - Reading time: 1 min - Words: 262 Key takeaways: - Many string operations that seem simple with ASCII become complex with Unicode. - Unicode defines four normalization forms. - Different contexts require different escaping: - Use grapheme-cluster-aware operations when dealing with user-visible text. - Always normalize before comparison, hashing, or storage to prevent phantom duplicates. ## Unicode-Aware String Processing Many string operations that seem simple with ASCII become complex with Unicode. A 'character' can be multiple code points (emoji with skin tone modifiers), a 'word' boundary differs by language, and 'uppercase' transforms are locale-dependent. Using the correct abstraction level prevents subtle data corruption. ## Common Operations and Pitfalls | Operation | ASCII Safe | Unicode Pitfall | | --- | --- | --- | | Length | `str.length` | Emoji `👨‍👩‍👧` is 5 code points, 1 grapheme | | Uppercase | `toUpperCase()` | Turkish `i` → `İ` (not `I`) | | Reverse | Swap chars | Combining marks detach from base characters | | Truncate | Slice at index | May split surrogate pairs or grapheme clusters | | Compare | `===` | `é` (one codepoint) ≠ `é` (e + combining accent) | ## Normalization Unicode defines four normalization forms. NFC (Canonical Decomposition + Composition) is the web standard — it composes characters into their precomposed forms where possible. Always normalize before comparison, hashing, or storage to prevent phantom duplicates. ## Escaping and Encoding Different contexts require different escaping: - **HTML**: `&`, `<`, `>`, `"`, `'` → entities - **URL**: Non-ASCII and reserved chars → percent encoding - **JSON**: Backslash, quotes, control characters → backslash escape - **SQL**: Use parameterized queries (never manual escaping) - **Regex**: `\`, `.`, `*`, `+`, `?`, `(`, `)`, `[`, `{` → backslash ## Best Practices Use grapheme-cluster-aware operations when dealing with user-visible text. Use code-point-level operations for protocol and storage layer work. Process text with the Peasy string tools for Unicode-safe operations. ### Text Hashing Explained: MD5, SHA-256, and When to Use Each Compare cryptographic and non-cryptographic hash functions. Understand when MD5 is acceptable, when SHA-256 is necessary, and why hash functions are not encryption. - URL: https://peasytext.com/guides/text-hashing-md5-sha256-comparison/ - Category: Comparison - Reading time: 1 min - Words: 280 Key takeaways: - Hash functions are one-way transformations — they convert input of any size into a fixed-size output (digest). - MD5 is cryptographically broken — collisions can be constructed in seconds. - SHA-256 provides 128-bit collision resistance — finding two inputs with the same hash requires approximately 2^128 operations. - Never use SHA-256 or MD5 directly for password storage. - ## Password Hashing Is Different Never use SHA-256 or MD5 directly for password storage. ## Hashing Is Not Encryption Hash functions are one-way transformations — they convert input of any size into a fixed-size output (digest). Unlike encryption, hashing is irreversible by design. You cannot recover the original data from a hash. This makes hashing ideal for integrity verification, password storage, and deduplication. ## Algorithm Comparison | Algorithm | Output Size | Speed | Security | Use Case | | --- | --- | --- | --- | --- | | MD5 | 128 bits | Very fast | Broken | Checksums, dedup (non-security) | | SHA-1 | 160 bits | Fast | Broken | Legacy systems only | | SHA-256 | 256 bits | Medium | Strong | File integrity, certificates | | SHA-3 | 256+ bits | Medium | Strong | Future-proof applications | | BLAKE3 | 256 bits | Very fast | Strong | High-performance hashing | | xxHash | 64/128 bits | Extreme | Non-crypto | Hash tables, caching | ## MD5: Still Useful, Not for Security MD5 is cryptographically broken — collisions can be constructed in seconds. However, it remains useful for non-adversarial checksums: verifying file downloads, detecting accidental corruption, and content-based deduplication where deliberate collision attacks are not a concern. ## SHA-256: The Standard Choice SHA-256 provides 128-bit collision resistance — finding two inputs with the same hash requires approximately 2^128 operations. It is the standard for digital signatures, certificate chains, and any context where an attacker might try to create hash collisions. ## Password Hashing Is Different Never use SHA-256 or MD5 directly for password storage. Use dedicated password hashing functions (bcrypt, scrypt, Argon2) that are intentionally slow and include salt values to prevent rainbow table attacks. ### Language Detection: How It Works and Its Limitations Understand the algorithms behind automatic language detection — n-gram frequency analysis, Unicode script detection, and machine learning approaches. Learn the reliability limits and how to handle ambiguous or mixed-language text. - URL: https://peasytext.com/guides/language-detection-how-it-works-limitations/ - Category: Comparison - Reading time: 1 min - Words: 282 Key takeaways: - Language detection analyzes statistical patterns in text to identify the most likely language. - Short text**: A single word like 'hotel' is valid in 20+ languages - For reliable detection, require at least 50 characters of natural text. - When detection is uncertain, return multiple candidates with confidence scores rather than a single guess. ## How Language Detection Works Language detection analyzes statistical patterns in text to identify the most likely language. The primary technique is n-gram frequency comparison — counting sequences of 2-4 characters and matching against known language profiles. Each language has a distinctive character frequency fingerprint. ## Detection Methods | Method | Accuracy | Speed | Minimum Text | Best For | | --- | --- | --- | --- | --- | | Unicode script | 60-80% | Instant | 1 character | Script identification | | Character n-grams | 95%+ | Fast | 20+ characters | Single-language text | | Word n-grams | 98%+ | Medium | 50+ characters | Long texts | | ML (fastText) | 97%+ | Fast | 10+ characters | Short texts, mixed | ## Where Detection Fails - **Short text**: A single word like 'hotel' is valid in 20+ languages - **Similar languages**: Serbian/Croatian/Bosnian are linguistically close - **Mixed language**: Code-switching within a paragraph confuses n-gram models - **Romanized text**: Japanese in romaji looks like Italian to character n-grams - **Technical jargon**: English technical terms appear in many language contexts ## Practical Strategies For reliable detection, require at least 50 characters of natural text. Use confidence scores — only accept detections above a threshold (typically 0.8). For user-generated content, prefer explicit language tags over detection when available. Combine Unicode script detection with n-gram analysis for the best results on short texts. ## Handling Ambiguity When detection is uncertain, return multiple candidates with confidence scores rather than a single guess. Let the application layer decide — user preferences, page language, or geographic context can disambiguate. Detect languages with the Peasy language detection tool for instant multi-language identification. ### Slug and URL-Safe String Generation Best Practices Slugs transform human-readable titles into URL-safe strings. Proper slug generation handles unicode, special characters, and collisions while preserving readability. - URL: https://peasytext.com/guides/slug-url-safe-string-generation/ - Category: Best Practice - Reading time: 1 min - Words: 299 Key takeaways: - A slug is a URL-safe version of a string, typically derived from a title or name. - Convert accented characters to ASCII equivalents: ü → u, ñ → n, ø → o. - Two different titles can produce the same slug. - Keep slugs under 80 characters for readability and under 255 characters for filesystem compatibility. - Generate slugs on creation, not on every request ## What Is a Slug A slug is a URL-safe version of a string, typically derived from a title or name. 'How to Merge PDF Files' becomes `how-to-merge-pdf-files`. Slugs appear in URLs, filenames, and database identifiers. ## Generation Rules | Step | Input | Output | |------|-------|--------| | 1. Lowercase | 'Hello World' | 'hello world' | | 2. Transliterate | 'café résumé' | 'cafe resume' | | 3. Remove special chars | 'hello! world?' | 'hello world' | | 4. Replace spaces | 'hello world' | 'hello-world' | | 5. Collapse hyphens | 'hello--world' | 'hello-world' | | 6. Trim hyphens | '-hello-world-' | 'hello-world' | ## Unicode Handling ### Transliteration Convert accented characters to ASCII equivalents: ü → u, ñ → n, ø → o. Libraries like `python-slugify` and `slugify` (npm) handle this automatically with locale-aware rules. ### CJK Characters Chinese, Japanese, and Korean characters do not transliterate to Latin. Options: - Keep original characters in the URL (modern browsers display them correctly) - Romanize: 東京 → tokyo (requires language-specific romanization libraries) - Use a numeric or UUID identifier instead ## Collision Handling Two different titles can produce the same slug. Handle collisions by appending a counter: - `my-article` - `my-article-2` - `my-article-3` Check for existing slugs in the database before saving. Use a unique constraint as a safety net. ## Length Considerations Keep slugs under 80 characters for readability and under 255 characters for filesystem compatibility. Truncate at word boundaries to avoid cutting words in half. ## Implementation Tips - Generate slugs on creation, not on every request - Make slugs immutable after creation (changing them breaks URLs) - If a title changes, keep the old slug and add a redirect to the new URL - Store slugs in a dedicated indexed column for fast lookups ### PDF Redaction: Permanently Removing Sensitive Information Covering text with black rectangles doesn't actually remove it from a PDF — the original content remains in the file and can be extracted. True redaction permanently deletes sensitive data. This guide covers proper redaction techniques. - URL: https://peasytext.com/guides/pdf-redaction-techniques-guide/ - Category: Troubleshooting - Reading time: 2 min - Words: 390 Key takeaways: - A common and dangerous mistake is using annotation tools (black rectangles, white boxes) to "redact" sensitive information. - Professional redaction tools perform a multi-step process: - Social Security numbers, bank account numbers, addresses, phone numbers, dates of birth, medical record numbers, and other personally identifiable information (PII). - After redaction, verify that the content is truly removed: - In legal and regulatory contexts, improper redaction can result in contempt of court, HIPAA violations, or GDPR non-compliance. ## The Critical Difference: Hiding vs Redacting A common and dangerous mistake is using annotation tools (black rectangles, white boxes) to "redact" sensitive information. These visual overlays hide content on screen but leave the original text intact in the PDF's content stream. Anyone with a text editor or PDF tool can remove the overlay and read the hidden content. High-profile incidents include court filings where blacked-out text was trivially recovered, exposing confidential information in legal cases. Proper redaction permanently removes the content from the file. ## How True Redaction Works Professional redaction tools perform a multi-step process: 1. **Mark** — Select the text or area to redact 2. **Apply** — The tool removes the underlying content stream data, not just the visual layer 3. **Flatten** — The redaction marker becomes a permanent part of the page rendering 4. **Clean** — Remove residual data from the file: hidden text, metadata, XMP, form fields, JavaScript After applying redaction, the original content no longer exists in the file — there is no way to recover it. ## What to Redact ### Visible Content Social Security numbers, bank account numbers, addresses, phone numbers, dates of birth, medical record numbers, and other personally identifiable information (PII). When redacting, consider context — a name alone may not be sensitive, but a name next to a diagnosis is. ### Hidden Content PDFs contain data beyond what's visible on screen: - **Document metadata** — Author name, organization, editing software - **Comments and annotations** — Review notes from collaborators - **Hidden layers** — Content on invisible layers remains in the file - **Form field data** — Previously entered form values - **Embedded files** — Attached documents, images, or data - **JavaScript** — Can contain or reference sensitive data ## Verification After redaction, verify that the content is truly removed: … ### Frame Rate Guide: Choosing 24fps, 30fps, or 60fps Frame rate affects perceived motion quality, file size, and the emotional tone of your video. Different contexts call for different frame rates. - URL: https://peasytext.com/guides/frame-rate-guide-24-30-60-fps/ - Category: How-To - Reading time: 1 min - Words: 207 Key takeaways: - Frame rate is the number of individual images displayed per second. - The standard for film since the 1920s. - The broadcast standard for NTSC television. - Twice the temporal resolution of 30fps. - Shoot at a higher frame rate than your delivery rate. ## How Frame Rate Affects Perception Frame rate is the number of individual images displayed per second. Higher rates produce smoother motion but larger files and a different visual character. ## 24fps — Cinematic The standard for film since the 1920s. 24fps has a natural motion blur that viewers associate with movies and premium content. It feels cinematic, dramatic, and intentional. **Use for:** Narrative content, brand films, music videos, documentaries. ## 30fps — Standard The broadcast standard for NTSC television. 30fps (29.97 technically) offers smoother motion than 24fps while remaining bandwidth-efficient. Most online content uses 30fps. **Use for:** Tutorials, vlogs, presentations, general web content. ## 60fps — Smooth Twice the temporal resolution of 30fps. Motion appears hyper-smooth, which is ideal for fast action but can make narrative content feel like a soap opera (the 'soap opera effect'). **Use for:** Gaming, sports, UI demonstrations, slow-motion source. ## File Size Impact | Frame Rate | Relative Size | |------------|---------------| | 24fps | 1x (baseline) | | 30fps | 1.25x | | 60fps | 2x | | 120fps | 4x | ## Slow Motion Shoot at a higher frame rate than your delivery rate. 120fps footage played at 30fps produces 4x slow motion. 240fps at 30fps gives 8x slow motion. ### Image SEO: Alt Text, Filenames, and Compression Images generate significant search traffic through Google Images and enhance page relevance signals. Optimizing alt text, filenames, and compression improves both accessibility and rankings. - URL: https://peasytext.com/guides/image-seo-alt-text-filenames/ - Category: How-To - Reading time: 1 min - Words: 283 Key takeaways: - Google Images drives approximately 22% of all web searches. - Alt text serves two purposes: it describes the image for visually impaired users (accessibility) and provides context for search engines. - Search engines use filenames as a relevance signal. - Use `srcset` and `sizes` attributes to serve appropriately sized images for each device: - Add `loading="lazy"` to below-the-fold images. ## Why Image SEO Matters Google Images drives approximately 22% of all web searches. Properly optimized images also enhance the page's topical relevance, improving organic rankings for the page itself. ## Alt Text Best Practices Alt text serves two purposes: it describes the image for visually impaired users (accessibility) and provides context for search engines. | Do | Don't | |----|------| | Describe the image accurately | Start with 'image of' or 'photo of' | | Include relevant keywords naturally | Stuff keywords unnaturally | | Keep under 125 characters | Leave alt text empty on informative images | | Leave decorative images alt="" | Add alt text to purely decorative images | **Good example**: `alt="Golden retriever puppy playing fetch in a park"` **Bad example**: `alt="dog puppy pet animal cute buy dog food cheap"` ## Filename Optimization Search engines use filenames as a relevance signal. Before uploading: - Use descriptive names: `golden-retriever-puppy.webp` not `IMG_4523.jpg` - Separate words with hyphens - Use lowercase letters only - Include the primary keyword ## Compression and Format | Format | Best For | Compression | |--------|----------|------------| | WebP | Photos and illustrations | 25-34% smaller than JPEG | | AVIF | High-quality photos | 30-50% smaller than JPEG | | SVG | Icons and logos | Infinitely scalable | | PNG | Screenshots with text | Lossless, larger files | ## Responsive Images Use `srcset` and `sizes` attributes to serve appropriately sized images for each device: ```html <img src="photo-800.webp" srcset="photo-400.webp 400w, photo-800.webp 800w, photo-1200.webp 1200w" sizes="(max-width: 600px) 400px, 800px" alt="Descriptive alt text"> ``` ## Lazy Loading Add `loading="lazy"` to below-the-fold images. Never lazy-load the LCP image (usually the hero image) as it delays the largest contentful paint. ### Image Accessibility: Writing Effective Alt Text Alt text makes images accessible to screen reader users and appears when images fail to load. It also contributes to image SEO. Writing useful alt text requires understanding context, purpose, and conciseness. - URL: https://peasytext.com/guides/image-accessibility-alt-text-guide/ - Category: How-To - Reading time: 2 min - Words: 389 Key takeaways: - Approximately 2.2 billion people globally have a vision impairment. - Describe the function of the image, not just its appearance. - Images that convey information need descriptive alt text: - Keep alt text under 125 characters when possible. - Include relevant keywords naturally — alt text is a ranking signal for image search. ## Why Alt Text Matters Approximately 2.2 billion people globally have a vision impairment. Screen readers convert alt text to speech, making images accessible to blind and low-vision users. Beyond accessibility, alt text serves as fallback content when images fail to load (slow connections, CDN outages) and helps search engines understand image content for image search results. ## The Golden Rule Describe the **function** of the image, not just its appearance. Ask yourself: if I replaced this image with text, what would that text say? ## Writing Effective Alt Text ### Informational Images Images that convey information need descriptive alt text: - **Poor:** `alt="chart"` — provides no information - **Poor:** `alt="image of a bar chart showing quarterly revenue data for 2025 with Q1 at 2.3M Q2 at 2.8M..."` — too verbose - **Good:** `alt="Quarterly revenue chart — steady growth from $2.3M (Q1) to $3.1M (Q4) in 2025"` — conveys the key insight ### Decorative Images Images that serve only as visual decoration (background patterns, spacers, purely aesthetic photos) should have an empty alt attribute: `alt=""`. This tells screen readers to skip the image entirely. An image without an alt attribute at all is an accessibility error — the screen reader will read the filename instead. ### Functional Images Images used as buttons or links need alt text describing the action, not the image: - **Poor:** `alt="magnifying glass"` (on a search button) - **Good:** `alt="Search"` — describes what happens when clicked - **Poor:** `alt="red arrow pointing right"` (on a next-page button) - **Good:** `alt="Next page"` — describes the action ### Complex Images For complex images like infographics, charts, or diagrams, provide a brief alt text summarizing the key takeaway, then offer the full data in a text alternative nearby (a data table, expandable section, or linked page). ## Length Guidelines Keep … ## Glossary (31 terms) ### ASCII (American Standard Code for Information Interchange) A 7-bit character encoding standard representing 128 characters including English letters, digits, and control codes. - URL: https://peasytext.com/glossary/ascii/ ### BOM (Byte Order Mark) A special Unicode character at the start of a file indicating its encoding and byte order. - URL: https://peasytext.com/glossary/bom/ ### Case Conversion (Text Case Conversion) Transforming text between uppercase, lowercase, title case, sentence case, or camelCase formats. - URL: https://peasytext.com/glossary/case-conversion/ ### CJK (Chinese, Japanese, Korean Characters) A collective term for the writing systems of East Asian languages, requiring multi-byte character encodings. - URL: https://peasytext.com/glossary/cjk/ ### Diacritics (Diacritical Marks) Marks added above, below, or through letters to alter pronunciation (e.g. accents, umlauts, cedillas). - URL: https://peasytext.com/glossary/diacritics/ ### Escape Character (Escape Character) A character (usually backslash) that gives special meaning to the following character in a string. - URL: https://peasytext.com/glossary/escape-character/ ### Grep (Global Regular Expression Print) A command-line tool for searching text using regular expression patterns, foundational in Unix workflows. - URL: https://peasytext.com/glossary/grep/ ### Kerning (Typographic Kerning) Adjusting the horizontal spacing between specific pairs of characters for visually balanced text. - URL: https://peasytext.com/glossary/kerning/ ### Leading (Line Spacing (Leading)) The vertical distance between lines of text, measured from baseline to baseline. - URL: https://peasytext.com/glossary/leading/ ### Ligature (Typographic Ligature) Two or more characters combined into a single glyph for aesthetic or readability purposes (e.g. fi, fl, ae). - URL: https://peasytext.com/glossary/ligature/ ### Line Ending (Line Ending Character) The invisible character(s) marking the end of a line — CR+LF on Windows, LF on Unix/macOS. - URL: https://peasytext.com/glossary/line-ending/ ### Lorem Ipsum (Lorem Ipsum Placeholder Text) Pseudo-Latin placeholder text used in design and typesetting to simulate the appearance of real content. - URL: https://peasytext.com/glossary/lorem-ipsum/ ### N-gram (N-gram) A contiguous sequence of n items from a text, used in natural language processing and text analysis. - URL: https://peasytext.com/glossary/n-gram/ ### Normalization (Text) (Unicode Normalization) Converting Unicode text to a canonical form (NFC, NFD, NFKC, NFKD) so equivalent characters compare as equal. - URL: https://peasytext.com/glossary/normalization-text/ ### Plain Text (Plain Text File) A file containing only unformatted characters with no styling, layout, or embedded objects. - URL: https://peasytext.com/glossary/plain-text/ ### Readability Score (Readability Score) A numerical measure of how easy text is to read, using formulas like Flesch-Kincaid or Gunning Fog Index. - URL: https://peasytext.com/glossary/readability-score/ ### Rich Text (Rich Text Format) A text format that supports formatting such as bold, italics, fonts, and colors across different applications. - URL: https://peasytext.com/glossary/rich-text/ ### ROT13 (ROT13 Cipher) A simple letter substitution cipher replacing each letter with the one 13 positions later in the alphabet. - URL: https://peasytext.com/glossary/rot13/ ### RTL (Right-to-Left Text) Text written from right to left, used in Arabic, Hebrew, and other scripts, requiring bidirectional layout. - URL: https://peasytext.com/glossary/rtl/ ### Slug (URL Slug) A URL-friendly version of a string with spaces replaced by hyphens and special characters removed. - URL: https://peasytext.com/glossary/slug/ ### Stemming (Word Stemming) Reducing words to their root form by removing suffixes (e.g. 'running' to 'run') for text analysis. - URL: https://peasytext.com/glossary/stemming/ ### String Distance (String Distance Metric) A measure of how different two strings are, calculated using algorithms like Levenshtein or Hamming distance. - URL: https://peasytext.com/glossary/string-distance/ ### String Interpolation (String Interpolation) Embedding variable values inside a string template, replacing placeholders with actual data at runtime. - URL: https://peasytext.com/glossary/string-interpolation/ ### Text Diff (Text Difference Comparison) An algorithm that compares two text documents and highlights additions, deletions, and modifications between them. - URL: https://peasytext.com/glossary/text-diff/ ### Text Encoding (Text Character Encoding) The scheme used to represent characters as bytes — including UTF-8, UTF-16, ISO-8859-1, and Windows-1252. - URL: https://peasytext.com/glossary/text-encoding/ ### Tokenization (Text Tokenization) Splitting text into meaningful units (tokens) such as words, sentences, or subword pieces for processing. - URL: https://peasytext.com/glossary/tokenization/ ### Transliteration (Script Transliteration) Converting text from one writing system to another letter by letter (e.g. Cyrillic to Latin). - URL: https://peasytext.com/glossary/transliteration/ ### Truncation (Text Truncation) Shortening text to a specific length, typically adding an ellipsis to indicate omitted content. - URL: https://peasytext.com/glossary/truncation/ ### Unicode (Unicode Standard) A universal character encoding standard assigning a unique code point to every character in every writing system. - URL: https://peasytext.com/glossary/unicode/ ### Whitespace (Whitespace Characters) Invisible characters including spaces, tabs, newlines, and carriage returns that affect text layout. - URL: https://peasytext.com/glossary/whitespace/ ### Word Count (Word Count Analysis) Counting the number of words in a text, often including character, sentence, and paragraph counts. - URL: https://peasytext.com/glossary/word-count/ ## API Base URL: https://peasytext.com/api/v1/ | Endpoint | Description | |----------|-------------| | GET /api/v1/tools/ | List all tools (filterable by category) | | GET /api/v1/tools/{slug}/ | Tool detail with description, steps, FAQ | | GET /api/v1/categories/ | Tool categories | | GET /api/v1/formats/ | File formats reference | | GET /api/v1/formats/{slug}/ | Format detail with history, pros/cons | | GET /api/v1/conversions/ | Format conversion guides | | GET /api/v1/glossary/ | Terminology with definitions | | GET /api/v1/glossary/{slug}/ | Term with simple + technical explanations, code examples, references | | GET /api/v1/guides/ | Educational guides (filterable by category, audience_level) | | GET /api/v1/guides/{slug}/ | Full guide with content, takeaways, ToC, related guides | | GET /api/v1/use-cases/ | Real-world use cases by industry | | GET /api/v1/search/?q={query} | Cross-model search | | GET /api/v1/sites/ | All 16 Peasy sites | OpenAPI spec: https://peasytext.com/api/openapi.json ## Content Negotiation All pages support Markdown output for AI agents: - Add `?format=md` to any page URL - Or send `Accept: text/markdown` header ## Platform Stats - 251 tools across 16 sites - 131 file formats documented - 1484 format conversion guides - 695 glossary terms (with simple + technical explanations) - 645 educational guides (avg 1,308 words) - 302 real-world use cases