Category: Guides

  • JSON Formatter Guide: How to Read, Validate and Fix Invalid JSON

    <
    PDFMasterHQFix Invalid JSONformat, validate, convert{ }

    JSON is the common text format for data in web apps and APIs. It is simple, but one wrong character makes a whole file fail to load. This guide covers what valid JSON looks like and the errors that cause most problems.

    What valid JSON looks like

    • Data is in objects (curly braces, with “key”: value pairs) and arrays (square brackets).
    • Keys and text values use double quotes.
    • Values can be text, numbers, true, false, null, objects or arrays.
    • Items are separated by commas.

    The most common errors

    • Trailing comma. A comma after the last item is not allowed.
    • Single quotes. Only double quotes are valid.
    • Unquoted keys. Keys must be in quotes, unlike in JavaScript objects.
    • Missing comma between two items, or a missing closing bracket.
    • Comments. JSON has no comment syntax.
    • Special values. NaN, undefined and Infinity are not valid.
    • Unescaped characters such as a raw new line or a quote inside text.

    How to fix it

    Paste the data into the JSON Formatter. It indents the data so the structure is easy to read and reports an error if the text is not valid, which points you toward the place to fix. Fix the first error, then check again, because one missing bracket can cause several messages. You can also minify the JSON to make it smaller before sending it.

    Converting JSON to a spreadsheet or PDF

    An array of similar objects maps neatly to rows and columns. The JSON to CSV Converter turns it into a table you can open in a spreadsheet, and converts CSV back to JSON. For a printable copy, use JSON to PDF. Deeply nested data does not fit a flat table well, so check the result.

    Dates and timestamps in JSON

    JSON has no date type, so dates appear as text or as a Unix timestamp, the number of seconds since 1 January 1970 UTC. For example, 1700000000 is 14 November 2023, 22:13:20 UTC. Convert them with the Unix Timestamp Converter. Check whether a value is in seconds or milliseconds, since milliseconds have three more digits.

    Privacy

    The tools run in your browser, so what you paste is not sent to our servers. Even so, avoid pasting live passwords, tokens or private keys into any online tool, and remove them from samples first. Other helpers: Text Diff to compare two versions and UUID Generator for test IDs.

  • How to Calculate Percentages: Percent of a Number, Percent Change and Discounts

    <
    PDFMasterHQPercentagespercent of, change and discounts%

    Percentages appear in prices, grades, interest and statistics. Three formulas cover most everyday cases.

    1. What is X% of a number?

    Multiply the number by the percentage divided by 100. 15% of 80 = 80 × 0.15 = 12. A quick trick: 10% is the number with the decimal point moved one place, so 10% of 80 is 8, and half of that (5%) is 4. Add them for 15%: 8 + 4 = 12.

    2. What percent is A of B?

    Divide A by B and multiply by 100. If you scored 42 out of 60: 42 ÷ 60 × 100 = 70%.

    3. Percent change

    Percent change = (new − old) ÷ old × 100. A price rising from 50 to 65 changes by (65 − 50) ÷ 50 × 100 = 30%. A price falling from 65 back to 50 changes by (50 − 65) ÷ 65 × 100 = about −23.1%. The two are not equal because each is measured against a different starting value.

    Discounts

    Sale price = price × (1 − discount ÷ 100). A 20% discount on 80 gives 80 × 0.8 = 64, so you save 16. Two discounts do not simply add up. Take 20% off 80 to get 64, then a further 10% off: 64 × 0.9 = 57.60. The total discount is 28%, not 30%.

    Common mistakes

    • Mixing up percent and percentage points. A rate moving from 4% to 6% is a rise of 2 percentage points, but a 50% increase.
    • Using the wrong base. Percent change is always measured against the old value.
    • Adding percentages that apply to different amounts, as in the double discount above.

    Try it

    Check your answers with the Percentage Calculator, the Discount Calculator and the Percent Off Calculator. To work out tax inside a price, read our guide to VAT, GST and sales tax.

  • Rent vs Buy: How to Compare the Real Costs Before You Decide

    <
    PDFMasterHQRent vs Buycompare the real costs

    “Renting is throwing money away” and “buying is always better” are both too simple. Which is cheaper depends on your numbers and on how long you will stay. Here is how to compare them fairly.

    Costs of buying

    • Down payment and closing costs. Paid up front, and the money can no longer earn a return elsewhere.
    • Mortgage interest. Only part of each early payment reduces the loan. See the mortgage payment guide.
    • Property tax and insurance. Paid every year.
    • Maintenance. A common rule of thumb is to set aside around 1% of the home’s value a year, but it varies with age and condition.
    • Selling costs. Agent fees and taxes can take a real slice when you sell.

    Costs of renting

    • Rent, which often rises over time.
    • Renter’s insurance and deposits.
    • No equity. Your payments do not build ownership. The benefit is flexibility and no repair bills.

    What decides the answer

    Three things usually matter most: how long you will stay, the price-to-rent ratio in your area, and what your down payment could earn if invested instead. Buying tends to need several years to recover the up-front and selling costs, so a short stay often favours renting. A very high home price compared with the rent for a similar home also favours renting.

    Questions to ask yourself

    • Will I stay at least five years?
    • Could I pay for a big repair without stress?
    • Would the monthly total, including tax and upkeep, fit my budget comfortably?
    • Do I want the freedom to move easily?

    Try it

    The Rent vs Buy Calculator compares the two with your numbers. Plan the deposit with the Down Payment Calculator, check the loan with the Mortgage Calculator, and see what you can afford with the House Affordability Calculator. House prices, rents and taxes vary widely, so treat results as estimates, not financial advice.

  • How to Split a PDF: By Pages, Ranges or File Size (Free, No Upload)

    <
    PDFMasterHQHow to Split a PDFpages, ranges or file size

    A big PDF is often hard to share. You may need only a few pages, or each chapter in its own file, or parts small enough to send by email. Here are the main ways to split a PDF and which one to use.

    1. Split into page ranges

    Use this when you know where each part starts and ends, for example pages 1 to 10 and 11 to 25. The Split PDF tool creates a separate file for each range. Open the file, enter the ranges, and download the results.

    2. Extract or delete pages

    If you want one new file with only certain pages, use Extract Pages. If it is easier to remove what you do not need, use Delete Pages. To change the order, use Reorder PDF, or Organize PDF to do all of it in one place.

    3. Split by file size

    Email and upload forms often limit attachments to a certain size. Split PDF by Size cuts the document into parts that each stay under the size you choose. A single page that is already larger than the limit cannot be cut further. In that case, compress it first with Compress PDF, or aim for a fixed target with Compress PDF to 100KB or Compress PDF to 200KB.

    Tips for a clean result

    • Check the page numbers in the PDF viewer first. The printed number on a page can differ from its position in the file.
    • Keep the original file until you have checked the new ones.
    • If the PDF is password protected, remove the password first with Unlock PDF, if you have the right to do so.
    • To join parts again later, use Merge PDF.

    Is it private?

    Yes. These tools run in your browser, so the file stays on your device and is not uploaded to our servers. That is useful for contracts, IDs and other sensitive documents. Very large files may be slow on older phones because your own device does the work.

  • BMI, BMR and TDEE: What Each Number Means and How They Fit Together

    <
    PDFMasterHQBMI, BMR, TDEEwhat each number means

    These three numbers are often mixed up. They answer different questions: BMI compares weight with height, BMR is what your body burns at rest, and TDEE is what you burn in a whole day.

    BMI: weight for height

    BMI = weight in kg ÷ (height in metres)². A person of 70 kg and 1.75 m has 70 ÷ 3.0625 = 22.9. Common adult ranges are under 18.5 (underweight), 18.5 to 24.9 (healthy range), 25 to 29.9 (overweight) and 30 or more (obesity). BMI is a quick screening number. It does not separate muscle from fat, and it ignores where fat is stored, so a muscular person can score high without being unhealthy.

    BMR: calories at rest

    Basal metabolic rate is the energy your body needs to stay alive at rest. A common estimate is the Mifflin-St Jeor equation: for men, 10 × weight (kg) + 6.25 × height (cm) − 5 × age + 5; for women, the same with − 161 at the end. A 30-year-old man of 70 kg and 175 cm: 700 + 1,093.75 − 150 + 5 = about 1,649 calories a day.

    TDEE: calories for the whole day

    Total daily energy expenditure is BMR times an activity factor. Typical factors are about 1.2 for little exercise, 1.375 for light, 1.55 for moderate and 1.725 for heavy exercise. At 1.55, the same man needs about 1,649 × 1.55 = 2,556 calories a day to keep his weight steady.

    How they fit together

    BMI tells you roughly where your weight sits for your height. BMR and TDEE tell you how much energy you use. If you eat about your TDEE, your weight tends to stay stable; eating less over time tends to reduce it, and eating more tends to increase it.

    Limits and care

    All of these are estimates and can be off by a few hundred calories for any one person. They are not medical advice. Children, pregnant women, older adults and people with medical conditions need a doctor’s guidance, and nobody should follow a very low calorie target without professional advice.

    Try it

    Calculate each number with the BMI Calculator, BMR Calculator, TDEE Calculator and Calorie Calculator. For more, see the Ideal Weight Calculator and Macro Calculator.

  • Compound Interest Explained: The Formula, the Rule of 72 and a Worked Example

    <
    PDFMasterHQCompound Interestformula, Rule of 72, example

    Compound interest means you earn interest on your interest. That is why savings and debts can grow faster over time than most people expect.

    Simple vs compound

    With simple interest, interest is paid only on the original amount. With compound interest, each period’s interest is added to the balance, and the next period’s interest is worked out on the larger balance.

    The formula

    Final amount = P × (1 + r ÷ n)^(n × t)

    • P is the starting amount.
    • r is the yearly rate as a decimal (7% is 0.07).
    • n is how many times a year interest is added.
    • t is the number of years.

    Worked example

    Put 10,000 in an account that pays 7% a year, compounded yearly, for 10 years: 10,000 × 1.07^10 = about 19,671.51. The balance almost doubles, and about 9,671.51 of it is interest. With simple interest at the same rate you would have only 17,000.

    Does compounding frequency matter?

    A little. Take 10,000 at 5% for 10 years. Compounded yearly it becomes about 16,288.95. Compounded monthly it becomes about 16,470.09. More frequent compounding helps, but the rate and the time matter far more than the frequency.

    The Rule of 72

    To estimate how long money takes to double, divide 72 by the yearly rate in percent. At 7%, 72 ÷ 7 is about 10.3 years, which matches the exact answer closely. It is only an estimate, and it works best for rates between about 5% and 12%. The same rule shows how fast a debt can double at a high rate.

    Limits

    Real returns are not fixed, and inflation, fees and taxes reduce what you keep. Treat a calculation as an illustration, not a promise.

    Try it

    Use the Compound Interest Calculator with different rates and times. For regular deposits, try the Savings Calculator or the Investment Calculator. To see what inflation does to the result, use the Inflation Calculator. This is general information, not financial advice.

  • How to Calculate a Monthly Mortgage Payment (Formula and Worked Example)

    <
    PDFMasterHQMonthly MortgagePaymentformula and worked example

    Your monthly mortgage payment depends on three things: how much you borrow, the interest rate and the length of the loan. Once you know the formula, you can check any lender’s quote yourself.

    The formula

    For a fixed-rate loan with equal monthly payments:

    Payment = L × r ÷ (1 − (1 + r)^−n)

    • L is the loan amount (price minus down payment).
    • r is the monthly rate: the yearly rate divided by 12, written as a decimal. A 6.5% yearly rate gives 0.065 ÷ 12 = 0.005417.
    • n is the number of monthly payments: years × 12. A 30-year loan has 360.

    Worked example

    You borrow 300,000 at 6.5% for 30 years. The monthly payment is about 1,896.20. Over 360 payments you repay about 682,633, so the interest alone is about 382,633, more than the amount you borrowed.

    Now compare a lower rate. Borrowing 200,000 at 6.25% for 30 years costs about 1,231.43 a month, with about 243,316 in interest. Small changes in the rate matter a lot over 30 years.

    How rate and term change the cost

    • A longer term lowers the monthly payment but raises the total interest.
    • A shorter term raises the payment but saves interest and clears the debt sooner.
    • A larger down payment reduces L, which lowers both the payment and the interest.

    What the formula leaves out

    The formula gives principal and interest only. A real monthly cost often also includes property tax, home insurance, mortgage insurance when the down payment is small, and community or ground fees. Rates may also change if your loan is variable. Ask your lender for a full estimate before you decide.

    Try it

    The Mortgage Calculator does the maths for you. The Mortgage Amortization Calculator shows how each year splits into interest and principal. The Down Payment Calculator helps you plan the deposit, and the Mortgage Payoff Calculator shows the effect of extra payments. For other countries, see the UK and Canadian versions. These are estimates, not financial advice.

  • Margin vs Markup: What Is the Difference and How to Price for Profit

    <
    PDFMasterHQMargin vs Markupwhat is the difference?FreeFree calculator40%67%

    Margin and markup both describe profit, but they measure it against different things. Mixing them up is one of the most common pricing mistakes in small businesses. Here is the difference, with examples.

    Definitions

    • Profit = selling price − cost.
    • Margin = profit ÷ selling price × 100. It is the share of the price you keep.
    • Markup = profit ÷ cost × 100. It is how much you add on top of cost.

    Example: you buy an item for 60 and sell it for 100. Profit is 40. Margin is 40 ÷ 100 = 40%. Markup is 40 ÷ 60 = 66.7%.

    Why the difference matters

    For the same sale, markup is always bigger than margin, because you divide by the smaller number (cost). If you add a 30% markup to cost, your margin is only 23.1%, not 30%. A markup of 50% gives a margin of 33.3%. Margin can never reach 100%, but markup can be any size.

    Set a price for the margin you want

    Price = cost ÷ (1 − margin ÷ 100). For a 30% margin on a cost of 70, the price is 70 ÷ 0.7 = 100. Many people wrongly multiply cost by 1.3 and get 91, which is only a 23% margin.

    Set a price for the markup you want

    Price = cost × (1 + markup ÷ 100). A cost of 60 with a 50% markup gives a price of 90.

    Try it

    The Margin and Markup Calculator works in three ways: from cost and price, from cost and margin, or from cost and markup. To find how many units you must sell to cover fixed costs, use the Break-even Calculator. For percentages in general, see the Percentage Calculator.

    Limits

    These numbers show gross profit on one item. They do not include tax, shipping, platform fees, discounts or running costs such as rent and wages. Your real profit can be lower, so leave room for those costs when you set prices.

  • VAT vs GST vs Sales Tax: What Is the Difference and How to Remove Tax from a Price

    <
    PDFMasterHQVAT vs GSTvs sales taxFreeFree calculators%

    VAT, GST and sales tax all add a percentage to the price of what you buy, but they work in slightly different ways. This guide explains the difference and shows how to add or remove tax with simple maths.

    The main difference

    • Sales tax is charged once, at the final sale to the customer. It is used in the United States and is set by states and local areas. Shelf prices usually do not include it.
    • VAT (value added tax) is charged at each step of production and sale, and businesses claim back the VAT they paid. Used in the European Union, the UK and many other countries. Prices shown to customers usually include VAT.
    • GST (goods and services tax) works like VAT. Used in countries such as India, Australia, Canada, New Zealand and Singapore. In India it is split into central and state parts for sales inside a state.

    For you as a shopper, the maths is the same: a percentage on top of a base price. What changes is the rate, the rules and whether the shelf price already includes it.

    Add tax to a price

    Total = price × (1 + rate ÷ 100). A 100 item with 20% tax costs 120.

    Remove tax from a total

    Price before tax = total ÷ (1 + rate ÷ 100). From 120 at 20%, the price before tax is 100, and the tax is 20.

    A common mistake is to take 20% off the total, which gives 96 instead of 100. The tax was calculated on the smaller price, so you must divide, not subtract a percentage of the total.

    Use a calculator

    These free tools do both directions with any rate: Sales Tax Calculator, VAT Calculator and GST Calculator. Enter the rate that applies to you, because the tools do not look up rates.

    Things to check

    • Rates change and differ by product type. Check with your tax office or a receipt.
    • Shops may round each item instead of the whole bill, so your total can differ by a cent or two.
    • Some goods are zero-rated or exempt.
    • For business filings, follow official rules and speak to an accountant. This guide is general information, not tax advice.

    If you sell products, also see the Margin and Markup Calculator to check your profit after costs.

  • JPG vs PNG vs WebP: Which Image Format Should You Use?

    <
    PDFMasterHQJPG vs PNG vs WebPwhich format to use?FreeNo uploadJPGPNGWebP

    JPG, PNG and WebP are the three image formats you meet most often. They are not the same, and picking the right one saves file size or avoids blurry results. Here is a plain comparison.

    The short answer

    • JPG for photos. Small files, works everywhere, no transparency.
    • PNG for logos, screenshots, text and images with a transparent background. Sharp edges, larger files.
    • WebP for websites. Smaller than JPG and PNG at similar quality, and it supports transparency. Not every older program can open it.

    How they differ

    JPG is a lossy format. It throws away small details to make the file small, and each time you save it again with compression, it loses a little more. PNG is lossless: the picture is kept exactly, which is why screenshots with text look crisp, but photos in PNG can be very large. WebP can work in either way, lossy or lossless, which is why it often produces the smallest file.

    Transparency

    PNG and WebP can have transparent areas, for example a logo that sits on any colour. JPG cannot. When you save a transparent PNG as a JPG, the transparent parts must be filled with a colour. The PNG to JPG tool lets you choose that fill colour, so you do not get an unexpected black background.

    Which one for what

    • Photo for an email or a form: JPG.
    • Logo or icon with a see-through background: PNG or WebP.
    • Screenshot with text: PNG.
    • Images on your own website: WebP, with JPG as a safe choice.
    • Printing: JPG or PNG, since print shops handle them best.

    Converting between them

    All of these run in your browser and do not upload your files: JPG to PNG, PNG to JPG, WebP to JPG and WebP to PNG. iPhone photos in HEIC format can be handled with HEIC to JPG.

    Remember that converting a JPG to PNG does not bring back detail that JPG already removed. The file may even get bigger. Convert only when a program or website requires that format.

    Questions

    Why does my WebP image not open? Some older programs do not support it. Convert it to JPG or PNG.

    Is PNG always better quality? It is lossless, but a PNG made from a JPG is no sharper than the JPG.