Quick & Easy Placeholder Images

What Is Placeholder.com?

Placeholder.com generates custom placeholder images on the fly, like these examples:-



   

How To Use Our Placeholders

Just specify the image size after our URL (https://via.placeholder.com/) and you’ll get a placeholder image. So the image URL should look this:-

https://via.placeholder.com/350x150

You can use the images in your HTML or CSS, like this:

<a href="https://placeholder.com"><img src="https://via.placeholder.com/350x150"></a>

(Be sure to check out our HTML & CSS tutorials at HTML.com, our sister site, if you’re rusty)

How To Set Image Size

Use width x height. Height is optional: if no height is specified, you placeholder image will be a square.

https://via.placeholder.com/300

Note: Size must be the first option in the URL

How To Set Image Formats

Image format is optional – the default is a .GIF. You can use the following image file extensions…

  • .GIF
  • .JPG
  • .JPEG
  • .PNG

Adding an image file extension will render the image in the correct format. JPG & JPEG are identical. The image extension can go at the end of any option in the URL, like this:-

  • https://via.placeholder.com/300.png/09f/fff
  • https://via.placeholder.com/300/09f.png/fff
  • https://via.placeholder.com/300/09f/fff.png

How To Set Custom Text

You can specify custom text for your placeholder image by using a query string at the very end of the URL:-

https://via.placeholder.com/300.png?text=Hello+World

This is optional. The default is the image dimensions in pixels. You can use A-Z characters, upper or lowercase, numbers, and most symbols.

NB: Spaces are specified with a +

https://via.placeholder.com/300?text=Placeholder.com+rocks!

How To Set Background & Text Color

Colors are represented as hex codes. For example, #FFFFFF is white. Colors must follow the dimensions.

https://via.placeholder.com/250/ffffff/000000

The first color is always the background color, and the second color is the text color.

New! HTTPS Support

SSL is a big deal for everybody in 2018. Your placeholder images will work with or without HTTPS:-

http://via.placeholder.com/300
https://via.placeholder.com/300

Any Questions?

We’ve got answers. Please see our frequently asked questions page.