These days, you can't make an online purchase without thinking about security. While you may not be responsible for fraudulent charges made by an identity thief, it can still take weeks to get the situation resolved, and you could end up without any available credit when you need it. Fortunately, there's now a better way to keep your credit your own.

It's called a virtual credit card, and it's designed to keep your online transactions as secure as possible. Here's what you should know about virtual credit cards.

Man online shopping with a credit card

Image source: Getty Images.

How do virtual credit cards work?

You can't put a virtual credit card in your wallet. Instead, it's a randomly generated credit card number that is linked to your account. You can use this number to make purchases online just as you would with your regular credit card, and the charges will show up on your monthly credit card statement like normal.

You may be able to protect your transactions further by setting an expiration date on the virtual credit card or by placing a spending cap on it. This enables you to use a new virtual credit card number for every purchase so that even if identity thieves get hold of that number, they won't be able to use it to make fraudulent charges in your name.

Are there any drawbacks to virtual credit cards?

While virtual credit cards can help make online purchases more secure, they can pose challenges in certain situations. If you need to return a purchase or dispute a charge for a purchase you never received, you may have trouble doing so if your virtual credit card number is no longer active.

Plus, it's not a physical card, so if you need to book travel arrangements, for example, for which you'll be required to show your card when you check in, a virtual credit card won't cut it. In that case, you'll have to stick to your regular credit card.

Where can I get a virtual credit card?

Virtual credit cards haven't hit the mainstream yet, but many major banks and credit card issuers do offer this service to their clients. Contact your card issuer or log in to your online account to find out if you can get a virtual credit card number. Keep in mind that the card issuer may refer to it by a name other than "virtual credit card," so you may have to do a little research to find out if it's available.

If your card issuer does offer virtual credit card numbers, then all you have to do when you're ready to make a purchase is log in to your credit card account, generate a virtual credit card number, and use it to complete the transaction just like you normally would.

You don't need a virtual credit card in order to keep your online transactions safe, though. There are third-party services that serve a similar purpose. You may also be able to set up text or email alerts through your credit card account, so you'll know the minute someone makes an unauthorized purchase on your account.

The Motley Fool has a disclosure policy.