They hit the home side with two early tries to race into a 14-0 lead in the opening 10 minutes as Stuart Worrall and Dan Jones crossed. Wales Under 20 squad outside half Jones converted both scores.
Bedford hit back with a seven try salvo to set-up a home quarter-final, but they were made to work hard for their victory. Josh Buggea and Paul Tupai scoed the first two home tries, but it was 21-14 to the Scarlets at the break after a kick-pass from Jones set wing Gavin Thomas free for a try which Jones again improved.
In the second half the home side had further tries from Nick Fenton-Wells, Henry Staff, Sam Blanchet and Dean Adamson and were also awarded a penalty try. Jones missed two penalty attempts early in the second half and then lost hooker Torin Myhill to the sin-bin in the 48th minute.
That allowed the home side to draw level at 21-21, but Jones ran in at the posts for his second try and added the conversion to re-take the lead. The penalty try for the Blues put them back on level terms before two Jones penalties took his match tally to 24 points and gave the Scarlets a six point advantage.
But three tries in the final 10 minutes from the home side, including another conversion, carried them the victory they needed to progress in the tournament.
Â