Web & SEO Tools Guide
The web runs on URLs, APIs, and data formats that every developer and content creator needs to understand. This guide covers four essential web utilities: URL parsing, credit card validation, screen resolution analysis, and JSON formatting -- with practical examples and best practices for each.
1. URL Parsing Basics
Every resource on the internet is identified by a URL (Uniform Resource Locator). While URLs are part of everyday browsing, understanding their internal structure is essential for web development, API design, debugging, and search engine optimization. A URL is not just a string of characters -- it is a precisely structured address with distinct components that browsers, servers, and search engines interpret differently.
Consider a typical URL like https://example.com:443/path/to/page?name=value&sort=asc#section. Each segment has a specific purpose: the scheme (https) tells the browser which protocol to use, the host (example.com) identifies the server, the optional port (443) specifies the network endpoint, the path (/path/to/page) locates the resource on the server, the query string(?name=value&sort=asc) passes parameters to the application, and the fragment (#section) points to a specific section within the page.
https://example.com:443/path/to/page?name=value&sort=asc#section
Scheme: https
Host: example.com
Port: 443
Path: /path/to/page
Query: ?name=value&sort=asc
Fragment: #sectionURL parsing is especially important when building web scrapers, API clients, or redirect handlers. Special characters in URLs must be percent-encoded -- for example, a space becomes %20, an ampersand becomes %26, and a Unicode character like e becomes %C3%A9. Failing to encode or decode URLs correctly leads to broken links, failed API calls, and security vulnerabilities like injection attacks.
For an interactive way to dissect any URL into its components, try KnowKit's URL Parser, which breaks down scheme, host, path, query parameters, and fragments in real time.
2. Credit Card Validation
Credit card validation is a fundamental part of any e-commerce checkout flow. Before submitting a payment, the front-end should validate that the card number is structurally correct -- catching typos early saves time and reduces failed transactions. The most widely used algorithm for this purpose is the Luhn algorithm(also known as the "modulus 10" algorithm), developed by IBM scientist Hans Peter Luhn in 1954.
The Luhn algorithm works by processing the digits of the card number from right to left. It doubles every second digit, subtracts 9 from any result that exceeds 9, sums all the digits together, and checks whether the total is divisible by 10. If the sum is a multiple of 10, the number passes the Luhn check. This simple mathematical test catches the majority of common input errors: single-digit mistakes are detected 100% of the time, and transpositions of adjacent digits are detected roughly 90% of the time.
Validating 4532 0151 1283 0366 (Visa):
Step 1: Reverse digits: 6 6 3 0 3 8 2 1 5 1 0 2 3 5 4 4
Step 2: Double every 2nd: 6 12 3 0 3 16 2 2 5 2 0 4 3 10 4 8
Step 3: Subtract 9 if >9: 6 3 3 0 3 7 2 2 5 2 0 4 3 1 4 8
Step 4: Sum all digits: 6+3+3+0+3+7+2+2+5+2+0+4+3+1+4+8 = 53
Step 5: 53 + 7 (check digit) = 60, which is divisible by 10
Result: VALIDIt is important to understand what credit card validation can and cannot do. The Luhn algorithm only verifies the mathematical structure of the number. It cannot determine whether a card is active, has available credit, or belongs to the person entering it. Additionally, each card network has its own rules for number length and Issuer Identification Number (IIN) ranges: Visa numbers start with 4 and are 16 digits, Mastercard starts with 5 and is 16 digits, American Express starts with 34 or 37 and is 15 digits, and so on. A good validator checks both the Luhn checksum and the network-specific rules.
To validate a card number interactively, use KnowKit's Credit Card Validator, which performs Luhn validation, identifies the card network, and shows the breakdown of the algorithm steps. All processing happens entirely in your browser -- no card data is ever sent to a server.
3. Screen Resolution & Responsive Design
Screen resolution refers to the number of pixels displayed on a device screen, typically expressed as width by height (e.g., 1920x1080). For web developers, understanding screen resolutions is critical for responsive design -- the practice of building websites that adapt their layout to different viewport sizes. With users accessing the web on phones, tablets, laptops, and large monitors, a one-size-fits-all layout no longer works.
The mobile-first approach has become the industry standard. Instead of designing for desktop and scaling down, developers start with the smallest viewport and progressively enhance the layout for larger screens using CSS media queries. This approach ensures that the mobile experience is not an afterthought and that page weight is kept minimal for mobile users who may have slower connections.
Mobile-first breakpoints (Tailwind CSS):
sm: 640px -- Large phones / small tablets
md: 768px -- Tablets
lg: 1024px -- Small laptops
xl: 1280px -- Desktops
2xl: 1536px -- Large desktops
Common device resolutions (2026):
Desktop: 1920x1080, 2560x1440, 3840x2160
Laptop: 1366x768, 1536x864, 1920x1080
Tablet: 768x1024 (iPad), 820x1180 (iPad Air)
Mobile: 360x800, 390x844 (iPhone 14), 412x915 (Pixel)Modern CSS frameworks like Tailwind CSS use a mobile-first breakpoint system. Classes without a breakpoint prefix apply to all screen sizes, while prefixed classes (e.g., md:, lg:) override the base styles at the specified width. This makes it straightforward to build layouts that look good on any device without writing complex media queries from scratch.
Beyond breakpoint selection, responsive design also involves considerations like touch targets (minimum 44x44px for mobile), fluid typography (using clamp() or viewport units), flexible images (using max-width: 100%), and viewport meta tags (setting width=device-width, initial-scale=1). Testing on real devices and using browser DevTools responsive mode are both important parts of the development workflow.
To see your current screen resolution and compare it with common device sizes, visit KnowKit's Screen Resolution tool, which displays your viewport dimensions, pixel ratio, color depth, and a reference table of popular device resolutions.
4. JSON Formatting for the Web
JSON (JavaScript Object Notation) is the de facto data interchange format for web APIs. Practically every REST API, GraphQL endpoint, and configuration file uses JSON. Despite its simplicity, working with JSON in practice often involves formatting, minifying, validating, and converting between JSON and related formats like YAML, CSV, and XML.
Formatting(also called "pretty-printing") adds consistent indentation and line breaks to JSON, making it readable for humans. This is essential during development and debugging when you need to inspect API responses or verify data structures. Minification does the opposite -- removing all unnecessary whitespace to produce the smallest possible file size. Minified JSON is used in production to reduce bandwidth and improve load times.
// Minified JSON (hard to read):
{"users":[{"id":1,"name":"Alice","email":"alice@example.com"},{"id":2,"name":"Bob","email":"bob@example.com"}]}
// Formatted JSON (easy to read):
{
"users": [
{
"id": 1,
"name": "Alice",
"email": "alice@example.com"
},
{
"id": 2,
"name": "Bob",
"email": "bob@example.com"
}
]
}Validation ensures that JSON data conforms to the specification. Common validation errors include trailing commas (allowed in JavaScript objects but not in strict JSON), single quotes instead of double quotes, unquoted keys, comments (not supported in standard JSON), and control characters in strings. A good JSON validator pinpoints the exact location and nature of each error, saving significant debugging time.
JSON also serves as an intermediate format for conversion between other data formats. Developers frequently need to convert JSON to CSV for spreadsheet analysis, JSON to XML for legacy system integration, or JSON to YAML for configuration files. Each format has its own quirks -- for example, YAML supports comments and anchors that have no JSON equivalent, so round-trip conversion may lose information.
To format, validate, minify, and convert JSON data, use KnowKit's Format Converter, which supports JSON, YAML, CSV, XML, TOML, and other formats with real-time validation and error highlighting.
Frequently Asked Questions
What are the main parts of a URL?
A URL consists of several components: the scheme (http or https), the host (domain name or IP address), the port (optional, defaults to 80 for http and 443 for https), the path (the specific resource location on the server), the query string (key-value parameters after the ? character), and the fragment (an anchor identifier after the # character). Understanding each part is essential for web development, debugging, and SEO optimization.
How does the Luhn algorithm validate credit card numbers?
The Luhn algorithm works by doubling every second digit from right to left, subtracting 9 from any result greater than 9, summing all digits together, and checking if the total is divisible by 10. It catches common typing errors like single-digit mistakes and transpositions, but it does not verify that a card is active or has sufficient funds.
What are the most common screen resolutions for web design?
As of 2026, the most common screen resolutions include 1920x1080 (Full HD desktop), 1366x768 (laptop), 1536x864 (scaled laptop), 360x800 (mobile), 390x844 (iPhone), and 412x915 (Android). For responsive design, developers typically use breakpoints at 640px (mobile), 768px (tablet), 1024px (small desktop), and 1280px+ (large desktop).
Why is JSON formatting important for web development?
JSON formatting is critical because most web APIs communicate using JSON. Properly formatted JSON with consistent indentation makes data easier to read, debug, and validate. Minified JSON reduces file size for production, while pretty-printed JSON aids development. Common errors include trailing commas, unquoted keys, and single quotes instead of double quotes.
What is the difference between URL encoding and URL decoding?
URL encoding converts special characters (like spaces, &, =, and non-ASCII characters) into a percent-encoded format (%20 for space, %26for &, etc.) so they can be safely transmitted in URLs. URL decoding reverses this process, converting percent-encoded sequences back into their original characters. Both operations are essential for building and parsing query strings.
Can a credit card validator check if a card has funds?
No. Client-side credit card validators only perform mathematical checks using the Luhn algorithm and card network rules (IIN ranges and length). They can verify that a number is structurally valid for a specific card network (Visa, Mastercard, etc.), but they cannot check account status, available balance, or whether the card has been reported stolen. That requires a real-time query to the card issuer via a payment gateway.
Nelson
Developer and creator of KnowKit. Building browser-based tools since 2024.