A man has been charged with armed robbery after allegedly trying to hold up an off-duty police officer with a toy gun in Brisbane's CBD.

Queensland Police Service said a man approached the male officer about 12:45am (AEST) on Sunday at the corner of Albert and Charlotte streets.

The man pressed what appeared to be a plastic toy handgun against the officer's stomach and made demands for money.

After being challenged, the would-be robber allegedly admitted the gun was a replica and ran away.

Officers from the Brisbane City Tactical Crime Squad apprehended the man near the Victoria Bridge a short while later.

They confirmed that the gun was a plastic replica.

The 20-year-old man from Victoria has been charged with one count each of attempted armed robbery and contravening a direction.

He was scheduled to appear at Brisbane Magistrates Court on Monday.