Facebook is adding an option to their Messenger app to allow users to make conversations secret by encrypting them.

It is currently testing the feature and said it will roll it out more widely by the summer.

The new "secret conversations" feature is optional and users have to choose to use it.

The encrypted chats will only be able to be read on devices where they are sent or received.

It does not work across different devices. So even if a person has Messenger on a phone and on a computer, the conversation will be visible on only one device.

Users also will be able to set a timer to control how long the message remains visible to anyone.

Facebook said: "It's also important to note that in secret conversations we don't currently support rich content like GIFs and videos, making payments, or other popular Messenger features."

Encryption involves scrambling data so it is unreadable unless a secret key or password is entered. In general smartphone terms this is the passwords and keycodes used to lock devices and log-in to various accounts.

Facebook have produced a guide on the more technical detail.

Apple and Google encrypt the data within their user's smartphones by default in order to protect sensitive information.

WhatsApp, the Facebook-owned messaging service, already uses end-to-end encryption on all messages.

It is currently being tested and will be rolled out more widely this summer, Facebook said.