Liverpool will face Everton in the FA Cup third round, while holders Arsenal will travel to Nottingham Forest.
Premier League leaders Manchester City have a home tie against Burnley, Manchester United host Derby and Chelsea are away at Norwich.
Seventh-tier Hereford, the lowest-ranked side left, will face Leicester if they overcome Fleetwood at the second attempt.
Three non-league sides remain but all are involved in replays.
National League side AFC Fylde will head to Premier League Bournemouth if they see off Wigan in a replay. Woking, who also play in the fifth tier, know victory over Peterborough in their replay will earn them a trip to Championship side Aston Villa.
In the pick of the other ties, AFC Wimbledon will travel to Wembley to take on Tottenham, Middlesbrough face Sunderland and Brighton & Hove Albion will host Crystal Palace – the latter one of three all-Premier League contests.
The Merseyside derby gives Liverpool the chance to correct one of cup football’s more unusual statistics – that the Reds have never beaten Everton in an FA Cup tie at Anfield.
In fact, the last time the Toffees lost at that ground in either the FA Cup or League Cup was in 1892, when Anfield was their home stadium and they were beaten by Burnley.
Ties will take place on the weekend of 6-7 January 2018.
The third-round draw in full
Ipswich Town v Sheffield United
Watford v Bristol City
Birmingham City v Burton Albion
Liverpool v Everton
Brighton & Hove Albion v Crystal Palace
Aston Villa v Woking or Peterborough United
Bournemouth v AFC Fylde or Wigan
Coventry City v Stoke City
Newport County v Leeds United
Bolton Wanderers v Huddersfield Town
Port Vale or Yeovil Town v Bradford City
Nottingham Forest v Arsenal
Brentford v Notts County
Queens Park Rangers v MK Dons
Manchester United v Derby County
Forest Green Rovers or Exeter City v West Bromwich Albion
Doncaster Rovers v Rochdale
Tottenham Hotspur v AFC Wimbledon
Middlesbrough v Sunderland
Fleetwood or Hereford v Leicester City
Blackburn Rovers or Crewe Alexandra v Hull City
Cardiff City v Mansfield Town
Manchester City v Burnley
Shrewsbury Town v West Ham United
Wolverhampton Wanderers v Swansea City
Stevenage v Reading
Newcastle United v Luton Town
Millwall v Barnsley
Fulham v Southampton
Wycombe Wanderers v Preston North End
Norwich City v Chelsea
Gillingham or Carlisle United v Sheffield Wednesday